[mutter] keyboard: Gobble up key events whenever we have a focused surface
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keyboard: Gobble up key events whenever we have a focused surface
- Date: Thu, 17 Apr 2014 23:16:11 +0000 (UTC)
commit 30ecd7c77013832ff205b9c3a40570368176e03d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Apr 17 16:33:34 2014 -0400
keyboard: Gobble up key events whenever we have a focused surface
If we have a focused surface, we need to eat up key events, not
just if we have a non-empty focus resource list. The latter would
happen if we have a focused client but it never called get_keyboard.
src/wayland/meta-wayland-keyboard.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 0d20f62..d5020da 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -232,11 +232,10 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
{
wl_keyboard_send_key (resource, serial, time, key, state);
}
-
- return TRUE;
}
- return FALSE;
+ /* Eat the key events if we have a focused surface. */
+ return (keyboard->focus_surface != NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]