wayland-keyboard: Don't send pressed keys on enter

We never want to send pressed keys to wayland clients on enter. The
protocol says that we should send them, presumably so that clients can
trigger their own key repeat routine in case they are given focus and
a key is physically pressed.

Unfortunately this causes some clients, in particular Xwayland, to
register key events that they really shouldn't handle, e.g. on an
Alt+Tab keybinding, where Alt is released before Tab, clients would
see Tab being pressed on enter followed by a key release event for
Tab, meaning that Tab would be processed by the client when it really
shouldn't.

Since the use case for the pressed keys array on enter seems weak to
us, we'll just fake that there are no pressed keys instead which
should be spec compliant even if it might not be true.

https://bugzilla.gnome.org/show_bug.cgi?id=727178
This commit is contained in:
Rui Matos
2014-10-07 18:51:19 +02:00
parent 33acb5fea0
commit c39f18c2d4
2 changed files with 20 additions and 42 deletions

View File

@@ -69,8 +69,6 @@ struct _MetaWaylandKeyboard
struct wl_listener focus_surface_listener;
uint32_t focus_serial;
struct wl_array pressed_keys;
MetaWaylandXkbInfo xkb_info;
GSettings *settings;