From c6b48d7cbcb820222c84f26d0d9b5f1d95298b90 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 18 Dec 2023 09:33:17 +0000 Subject: [PATCH] x: fix x_request_vblank_event present_notify_msc with divisor == 0 has undocumented special meaning, it means async present notify, which means we could receive MSC notifications from the past. Signed-off-by: Yuxuan Shui --- src/x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/x.c b/src/x.c index 45abe31..06c8b93 100644 --- a/src/x.c +++ b/src/x.c @@ -780,8 +780,7 @@ err: } void x_request_vblank_event(struct x_connection *c, xcb_window_t window, uint64_t msc) { - auto cookie = - xcb_present_notify_msc(c->c, window, 0, msc, 0, 0); + auto cookie = xcb_present_notify_msc(c->c, window, 0, msc, 1, 0); set_cant_fail_cookie(c, cookie); }