From: Peter Hutterer Date: Sun, 19 Apr 2009 22:28:53 +0000 (+1000) Subject: XSync the display before jumping in the grab code. X-Git-Url: https://diplodocus.org/git/xorg-xinput/commitdiff_plain/2722d1a177c9482989e314e0177c782563a0b54e?hp=0df21cff5cdf2cf4af0af353f0dbfc7c33388b32 XSync the display before jumping in the grab code. The grab code only handles button presses, so we need to remove all events before (exposures, enter/leave, etc.). --- diff --git a/src/test_xi2.c b/src/test_xi2.c index 04eb9ae..713bc1a 100644 --- a/src/test_xi2.c +++ b/src/test_xi2.c @@ -243,6 +243,8 @@ test_xi2(Display *display, list(display, argc, argv, name, desc); win = create_win(display); + XSync(display, False); + /* Select for motion events */ mask.deviceid = AllDevices; mask.mask_len = 2;