[gtk+] wayland: Don't trigger grab on missing capabilities
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Don't trigger grab on missing capabilities
- Date: Mon, 21 Dec 2015 18:16:13 +0000 (UTC)
commit fc2879108d577ced23b46ca636be72e1883c3666
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 21 19:13:41 2015 +0100
wayland: Don't trigger grab on missing capabilities
Those might not be currently there in the first place.
gdk/wayland/gdkdevice-wayland.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 7afc30f..969ed96 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2438,7 +2438,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
return GDK_GRAB_NOT_VIEWABLE;
}
- if (capabilities & GDK_SEAT_CAPABILITY_POINTER)
+ if (wayland_seat->master_pointer &&
+ capabilities & GDK_SEAT_CAPABILITY_POINTER)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_pointer);
@@ -2461,7 +2462,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
gdk_wayland_device_update_window_cursor (wayland_seat);
}
- if (capabilities & GDK_SEAT_CAPABILITY_TOUCH)
+ if (wayland_seat->touch_master &&
+ capabilities & GDK_SEAT_CAPABILITY_TOUCH)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->touch_master);
@@ -2481,7 +2483,8 @@ gdk_wayland_seat_grab (GdkSeat *seat,
FALSE);
}
- if (capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
+ if (wayland_seat->master_keyboard &&
+ capabilities & GDK_SEAT_CAPABILITY_KEYBOARD)
{
GdkWindow *prev_focus = gdk_wayland_device_get_focus (wayland_seat->master_keyboard);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]