wayland: shortcuts inhibitor requires a window
Issuing a shortcut inhibit request for a surface without a window set will lead to a crash when trying to show the shortcut inhibitor dialog. In such a case, it's safer to deny the request. https://bugzilla.gnome.org/show_bug.cgi?id=792599
This commit is contained in:
parent
eac0e253e1
commit
13cf19e0b6
@ -148,7 +148,9 @@ zwp_keyboard_shortcuts_inhibit_manager_inhibit_shortcuts (struct wl_client *cl
|
|||||||
G_CALLBACK (surface_destroyed_cb),
|
G_CALLBACK (surface_destroyed_cb),
|
||||||
shortcut_inhibit);
|
shortcut_inhibit);
|
||||||
|
|
||||||
meta_wayland_surface_show_inhibit_shortcuts_dialog (surface, seat);
|
/* Cannot grant shortcuts to a surface without any window */
|
||||||
|
if (meta_wayland_surface_get_toplevel_window (surface))
|
||||||
|
meta_wayland_surface_show_inhibit_shortcuts_dialog (surface, seat);
|
||||||
|
|
||||||
wl_resource_set_implementation (keyboard_shortcuts_inhibit_resource,
|
wl_resource_set_implementation (keyboard_shortcuts_inhibit_resource,
|
||||||
&meta_keyboard_shortcuts_inhibit_interface,
|
&meta_keyboard_shortcuts_inhibit_interface,
|
||||||
|
Loading…
Reference in New Issue
Block a user