shell-global: Ignore modal operations if we have no compositor

Modal dialog actions might be triggered during display closing, and in such
cases we should just ignore the requests.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/746
This commit is contained in:
Marco Trevisan (Treviño) 2019-10-02 21:56:05 +02:00
parent 31d915a38a
commit 31fe517007

View File

@ -943,6 +943,9 @@ shell_global_begin_modal (ShellGlobal *global,
guint32 timestamp,
MetaModalOptions options)
{
if (!meta_display_get_compositor (global->meta_display))
return FALSE;
/* Make it an error to call begin_modal while we already
* have a modal active. */
if (global->has_modal)
@ -964,6 +967,9 @@ void
shell_global_end_modal (ShellGlobal *global,
guint32 timestamp)
{
if (!meta_display_get_compositor (global->meta_display))
return;
if (!global->has_modal)
return;