[PATCH] Don't release keyboard grab until all keys are up.

Scott Moreau oreaus at gmail.com
Sat Mar 3 21:22:43 PST 2012


---
 src/shell.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 2b61202..482c9b8 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1176,7 +1176,7 @@ zoom_grab_key(struct wl_keyboard_grab *grab,
 	struct weston_output *output;
 	struct weston_zoom_grab *zoom;
 
-	if (!(wd->modifier_state & MODIFIER_SUPER)) {
+	if (!(wd->modifier_state & MODIFIER_SUPER) && wd->input_device.keys.size == 0) {
 		zoom = container_of(grab, struct weston_zoom_grab, grab);
 		wl_input_device_end_keyboard_grab(device, time);
 		free(zoom);
@@ -1911,7 +1911,7 @@ switcher_key(struct wl_keyboard_grab *grab,
 	struct weston_input_device *device =
 		(struct weston_input_device *) grab->input_device;
 
-	if ((device->modifier_state & MODIFIER_SUPER) == 0) {
+	if ((device->modifier_state & MODIFIER_SUPER) == 0 && device->input_device.keys.size == 0) {
 		switcher_destroy(switcher, time);
 	} else if (key == KEY_TAB && state) {
 		switcher_next(switcher);
-- 
1.7.4.1



More information about the wayland-devel mailing list