[mutter] wayland-keyboard: Notify clients of pending modifier state changes
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland-keyboard: Notify clients of pending modifier state changes
- Date: Tue, 19 Apr 2016 16:03:22 +0000 (UTC)
commit e284370013013967a6483de9c067ad4fde4954f9
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Nov 3 17:58:16 2015 +0100
wayland-keyboard: Notify clients of pending modifier state changes
If we get a key event but still have pending modifier state changes we
need to send a modifiers event right away so that the key event can be
interpreted by clients correctly modified.
This case could happen when mutter/gnome-shell itself consumes the
modifier key press event such as with the overview key which by
default is triggered on super press.
https://bugzilla.gnome.org/show_bug.cgi?id=748526
src/wayland/meta-wayland-keyboard.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 1772460..003e483 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -555,6 +555,13 @@ meta_wayland_keyboard_update (MetaWaylandKeyboard *keyboard,
{
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
+ /* If we get a key event but still have pending modifier state
+ * changes from a previous event that didn't get cleared, we need to
+ * send that state right away so that the new key event can be
+ * interpreted by clients correctly modified. */
+ if (keyboard->mods_changed)
+ notify_modifiers (keyboard);
+
keyboard->mods_changed = xkb_state_update_key (keyboard->xkb_info.state,
event->hardware_keycode,
is_press ? XKB_KEY_DOWN : XKB_KEY_UP);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]