core: stop sending NotifyMsc if frame pacing is disabled

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-12-16 08:52:20 +00:00
parent a4fae2b60a
commit 480fd24da6
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 5 additions and 3 deletions

View File

@ -1489,9 +1489,11 @@ handle_present_complete_notify(session_t *ps, xcb_present_complete_notify_event_
return;
}
auto cookie = xcb_present_notify_msc(ps->c, session_get_target_window(ps), 0,
cne->msc + 1, 0, 0);
set_cant_fail_cookie(ps, cookie);
if (ps->frame_pacing) {
auto cookie = xcb_present_notify_msc(ps->c, session_get_target_window(ps),
0, cne->msc + 1, 0, 0);
set_cant_fail_cookie(ps, cookie);
}
if (cne->msc <= ps->last_msc || cne->ust == 0) {
// X sometimes sends duplicate/bogus MSC events, ignore them