[gtk+] wayland: Only try and process keyboard events when focussed
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Only try and process keyboard events when focussed
- Date: Sun, 4 Aug 2013 13:44:22 +0000 (UTC)
commit a8fc099a725543649fe3aab76943c14bdcd860fc
Author: Rob Bradford <rob linux intel com>
Date: Sun Aug 4 14:01:10 2013 +0100
wayland: Only try and process keyboard events when focussed
When combining Clutter with GTK+ we can receive events for surfaces which in
the client side we do not have focussed.
gdk/wayland/gdkdevice-wayland.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 862942c..61cf9bc 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -897,6 +897,8 @@ keyboard_handle_leave (void *data,
return;
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
return;
+ if (!device->keyboard_focus)
+ return;
_gdk_wayland_display_update_serial (wayland_display, serial);
@@ -1106,6 +1108,9 @@ keyboard_handle_key (void *data,
GdkWaylandDisplay *wayland_display =
GDK_WAYLAND_DISPLAY (device->display);
+ if (!device->keyboard_focus)
+ return;
+
device->repeat_count = 0;
_gdk_wayland_display_update_serial (wayland_display, serial);
deliver_key_event (data, time, key + 8, state_w);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]