Read and dispatch pending Wayland events to make sure we do not miss a
possible reply from the compositor prior to discard a key repeat.

Signed-off-by: Olivier Fourdan <[email protected]>
---
 v2: no change, just keep the patch series together.

 hw/xwayland/xwayland-input.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
index 236033b..bcfce35 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -559,6 +559,9 @@ keyboard_check_repeat (DeviceIntPtr dev, XkbSrvInfoPtr 
xkbi, unsigned key)
     struct wl_callback *callback;
     struct sync_pending *p;
 
+    /* Make sure we didn't miss a possible reply from the compositor */
+    xwl_sync_events (xwl_screen);
+
     xorg_list_for_each_entry(p, &xwl_seat->sync_pending, l)
         if (p->pending_dev == dev) {
             ErrorF("Key repeat discarded, Wayland compositor doesn't "
-- 
2.7.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to