[mutter/wip/carlosg/x11less-preparations: 22/26] x11: Unmanage X11 windows on MetaX11Display finalization
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/x11less-preparations: 22/26] x11: Unmanage X11 windows on MetaX11Display finalization
- Date: Tue, 7 May 2019 11:21:41 +0000 (UTC)
commit 72f928fb4d523ab20904976ac06e454c9b20afe6
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 10 13:42:53 2018 +0100
x11: Unmanage X11 windows on MetaX11Display finalization
This used to be relied upon meta_display_close(), but MetaDisplay
and MetaX11Display lifetimes may be unrelated.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
src/x11/meta-x11-display.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index f7e0c2f56..49f7abb5c 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -95,6 +95,27 @@ static void unset_wm_check_hint (MetaX11Display *x11_display);
static void prefs_changed_callback (MetaPreference pref,
void *data);
+static void
+meta_x11_display_unmanage_windows (MetaX11Display *x11_display)
+{
+ GList *windows, *l;
+ MetaWindow *window;
+
+ if (!x11_display->xids)
+ return;
+
+ windows = g_hash_table_get_values (x11_display->xids);
+ g_list_foreach (windows, (GFunc) g_object_ref, NULL);
+
+ for (l = windows; l; l = l->next)
+ {
+ window = l->data;
+ if (!window->unmanaging)
+ meta_window_unmanage (window, META_CURRENT_TIME);
+ }
+ g_list_free_full (windows, g_object_unref);
+}
+
static void
meta_x11_display_dispose (GObject *object)
{
@@ -107,6 +128,7 @@ meta_x11_display_dispose (GObject *object)
meta_x11_display_ungrab_keys (x11_display);
meta_x11_selection_shutdown (x11_display);
+ meta_x11_display_unmanage_windows (x11_display);
g_clear_object (&x11_display->x11_stack);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]