mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
display: Handle late unredirect (un)inhibit calls
When tearing down, gnome-shell may call various methods a bit late, specifically while MetaDisplay is closing, after MetaCompositor is freed. Handle calls to the fullscreen unredirect inhibitation counters happening after MetaCompositor tear down by ignoring them. We're closing anyway, so it's not a problem. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1710 https://gitlab.gnome.org/GNOME/mutter/merge_requests/808
This commit is contained in:
parent
4bf0bd3f55
commit
f352c3d79d
@ -1285,9 +1285,14 @@ meta_compositor_class_init (MetaCompositorClass *klass)
|
||||
void
|
||||
meta_disable_unredirect_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
MetaCompositorPrivate *priv =
|
||||
meta_compositor_get_instance_private (compositor);
|
||||
MetaCompositor *compositor;
|
||||
MetaCompositorPrivate *priv;
|
||||
|
||||
if (display->closing)
|
||||
return;
|
||||
|
||||
compositor = get_compositor_for_display (display);
|
||||
priv = meta_compositor_get_instance_private (compositor);
|
||||
|
||||
priv->disable_unredirect_count++;
|
||||
}
|
||||
@ -1302,9 +1307,14 @@ meta_disable_unredirect_for_display (MetaDisplay *display)
|
||||
void
|
||||
meta_enable_unredirect_for_display (MetaDisplay *display)
|
||||
{
|
||||
MetaCompositor *compositor = get_compositor_for_display (display);
|
||||
MetaCompositorPrivate *priv =
|
||||
meta_compositor_get_instance_private (compositor);
|
||||
MetaCompositor *compositor;
|
||||
MetaCompositorPrivate *priv;
|
||||
|
||||
if (display->closing)
|
||||
return;
|
||||
|
||||
compositor = get_compositor_for_display (display);
|
||||
priv = meta_compositor_get_instance_private (compositor);
|
||||
|
||||
if (priv->disable_unredirect_count == 0)
|
||||
g_warning ("Called enable_unredirect_for_display while unredirection is enabled.");
|
||||
|
Loading…
Reference in New Issue
Block a user