mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
wayland: Don't trigger grab on missing capabilities
Those might not be currently there in the first place.
This commit is contained in:
parent
3075dac106
commit
fc2879108d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user