Blame SOURCES/0001-window-unmanage-dialog-when-clearing-transient_for.patch

776610
From 398f03bd0fcd4eb31f9a0fc4990c21db4072488c Mon Sep 17 00:00:00 2001
776610
From: Olivier Fourdan <ofourdan@redhat.com>
776610
Date: Tue, 10 Jul 2018 14:42:42 +0000
776610
Subject: [PATCH] window: unmanage dialog when clearing transient_for
776610
776610
On Wayland, xdg-foreign would leave a modal dialog managed even after
776610
the imported surface is destroyed.
776610
776610
This is sub-optimal and this breaks the atomic relationship one would
776610
expect between the parent and its modal dialog.
776610
776610
Make sure we unmanage the dialog if transient_for is unset even for
776610
Wayland native windows.
776610
776610
Related: https://gitlab.gnome.org/GNOME/mutter/issues/174
776610
Related: https://gitlab.gnome.org/GNOME/mutter/issues/221
776610
776610
776610
(cherry picked from commit b443bd42ac738092817addf48e0b363d140cad26)
776610
---
776610
 src/core/window.c | 8 ++++++++
776610
 1 file changed, 8 insertions(+)
776610
776610
diff --git a/src/core/window.c b/src/core/window.c
776610
index e68f5245c..a1f4aa4f3 100644
776610
--- a/src/core/window.c
776610
+++ b/src/core/window.c
776610
@@ -7942,7 +7942,15 @@ meta_window_set_transient_for (MetaWindow *window,
776610
             }
776610
         }
776610
     }
776610
+  else if (window->attached && parent == NULL)
776610
+    {
776610
+      guint32 timestamp;
776610
 
776610
+      timestamp =
776610
+        meta_display_get_current_time_roundtrip (window->display);
776610
+      meta_window_unmanage (window, timestamp);
776610
+      return;
776610
+    }
776610
   /* We know this won't create a reference cycle because we check for loops */
776610
   g_clear_object (&window->transient_for);
776610
   window->transient_for = parent ? g_object_ref (parent) : NULL;
776610
-- 
776610
2.19.0
776610