[gtk+/gtk-3-20] wayland: Perform seat grab focus checks on native windows
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] wayland: Perform seat grab focus checks on native windows
- Date: Wed, 27 Apr 2016 11:35:19 +0000 (UTC)
commit 7dac5192777744f0eb5ab395f1bda33191b97714
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 27 12:12:18 2016 +0200
wayland: Perform seat grab focus checks on native windows
We don't care about the specific (possibly client-side) window that
requested the focus here, only the toplevel. Fixes mistakenly sent
focus events when the grab happens inside the current focus window.
https://bugzilla.gnome.org/show_bug.cgi?id=762756
gdk/wayland/gdkdevice-wayland.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 296dd3c..4745357 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2738,7 +2738,7 @@ gdk_wayland_seat_grab (GdkSeat *seat,
if (native == NULL || GDK_WINDOW_DESTROYED (native))
return GDK_GRAB_NOT_VIEWABLE;
- gdk_wayland_seat_set_grab_window (wayland_seat, window);
+ gdk_wayland_seat_set_grab_window (wayland_seat, native);
wayland_seat->pointer_grab_time = evtime;
if (prepare_func)
@@ -2757,9 +2757,9 @@ gdk_wayland_seat_grab (GdkSeat *seat,
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
- if (prev_focus != window)
+ if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->master_pointer, prev_focus,
- window, GDK_CROSSING_GRAB, evtime);
+ native, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_pointer,
@@ -2782,9 +2782,9 @@ gdk_wayland_seat_grab (GdkSeat *seat,
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
- if (prev_focus != window)
+ if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->touch_master, prev_focus,
- window, GDK_CROSSING_GRAB, evtime);
+ native, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->touch_master,
@@ -2803,9 +2803,9 @@ gdk_wayland_seat_grab (GdkSeat *seat,
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
- if (prev_focus != window)
+ if (prev_focus != native)
device_emit_grab_crossing (wayland_seat->master_keyboard, prev_focus,
- window, GDK_CROSSING_GRAB, evtime);
+ native, GDK_CROSSING_GRAB, evtime);
_gdk_display_add_device_grab (display,
wayland_seat->master_keyboard,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]