Skip to content

Commit

Permalink
core: don't trust msc from present complete notify
Browse files Browse the repository at this point in the history
Sometimes X sends bogus complete notifies with invalid msc number.
Instead just use msc=0, divisor=1 to get the next complete notify.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Dec 17, 2022
1 parent b904776 commit 640addb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,8 +1520,8 @@ handle_present_complete_notify(session_t *ps, xcb_present_complete_notify_event_
}

if (ps->frame_pacing) {
auto cookie = xcb_present_notify_msc(
ps->c, session_get_target_window(ps), 0, cne->msc + 1, 0, 0);
auto cookie =
xcb_present_notify_msc(ps->c, session_get_target_window(ps), 0, 0, 1, 0);
set_cant_fail_cookie(ps, cookie);
}

Expand Down

0 comments on commit 640addb

Please sign in to comment.