From dd5a4ecdf93f0bf03819416618ab15430b2b7e56 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 9 Oct 2015 16:40:45 +0200 Subject: [PATCH] wayland: Store key press/release serials on MetaWaylandKeyboard https://bugzilla.gnome.org/show_bug.cgi?id=756296 --- src/wayland/meta-wayland-keyboard.c | 5 +++-- src/wayland/meta-wayland-keyboard.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index c4836cb7b..7cc485360 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -251,11 +251,12 @@ notify_key (MetaWaylandKeyboard *keyboard, { struct wl_client *client = wl_resource_get_client (keyboard->focus_surface->resource); struct wl_display *display = wl_client_get_display (client); - uint32_t serial = wl_display_next_serial (display); + + keyboard->key_serial = wl_display_next_serial (display); wl_resource_for_each (resource, l) { - wl_keyboard_send_key (resource, serial, time, key, state); + wl_keyboard_send_key (resource, keyboard->key_serial, time, key, state); } } diff --git a/src/wayland/meta-wayland-keyboard.h b/src/wayland/meta-wayland-keyboard.h index ea9db32d1..aaf431f91 100644 --- a/src/wayland/meta-wayland-keyboard.h +++ b/src/wayland/meta-wayland-keyboard.h @@ -68,6 +68,7 @@ struct _MetaWaylandKeyboard MetaWaylandSurface *focus_surface; struct wl_listener focus_surface_listener; uint32_t focus_serial; + uint32_t key_serial; MetaWaylandXkbInfo xkb_info; enum xkb_state_component mods_changed;