[PATCH xserver 4/4] xwayland: sync event queue to check compositor reply

Olivier Fourdan ofourdan at redhat.com
Wed Mar 9 09:33:50 UTC 2016


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

Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 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 28d8b54..89f6faf 100644
--- a/hw/xwayland/xwayland-input.c
+++ b/hw/xwayland/xwayland-input.c
@@ -546,6 +546,9 @@ keyboard_check_repeat (DeviceIntPtr dev, XkbSrvInfoPtr xkbi, unsigned key)
     struct xwl_screen *xwl_screen = xwl_seat->xwl_screen;
     struct wl_callback *callback;
 
+    /* Make sure we didn't miss a possible reply from the compositor */
+    xwl_sync_events (xwl_screen);
+
     if (!xwl_seat->sync_pending) {
         callback = wl_display_sync (xwl_screen->display);
         wl_callback_add_listener(callback, &sync_listener, xwl_seat);
-- 
2.5.0



More information about the xorg-devel mailing list