mirror of
https://github.com/brl/mutter.git
synced 2025-06-21 04:24:18 +00:00
wayland/keyboard: Check keyboard presence at set focus call site
Make the caller of focus setting and grab starting check whether there is a keyboard to update the focus state or start grabbing. It makes it more obvious what to expect, as the call would be a no-op in when no keyboard is present. https://bugzilla.gnome.org/show_bug.cgi?id=771646
This commit is contained in:
@ -1195,9 +1195,12 @@ data_device_start_drag (struct wl_client *client,
|
||||
&drag_grab_interface,
|
||||
surface, drag_source, icon_surface);
|
||||
|
||||
meta_wayland_keyboard_set_focus (seat->keyboard, NULL);
|
||||
meta_wayland_keyboard_start_grab (seat->keyboard,
|
||||
&seat->data_device.current_grab->keyboard_grab);
|
||||
if (meta_wayland_seat_has_keyboard (seat))
|
||||
{
|
||||
meta_wayland_keyboard_set_focus (seat->keyboard, NULL);
|
||||
meta_wayland_keyboard_start_grab (seat->keyboard,
|
||||
&seat->data_device.current_grab->keyboard_grab);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user