|
|
657d8e |
From 9a8bb8a205656ca1089444a041c99c5591477642 Mon Sep 17 00:00:00 2001
|
|
|
657d8e |
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
|
|
657d8e |
Date: Fri, 3 May 2019 18:10:47 +0000
|
|
|
657d8e |
Subject: [PATCH 2/2] window: Emit an error and return when trying to activate
|
|
|
657d8e |
an unmanaged
|
|
|
657d8e |
|
|
|
657d8e |
If something (i.e. gnome-shell or an extension) tries to activate an unmanaged
|
|
|
657d8e |
window, we should warn about this and avoid to perform further actions as this
|
|
|
657d8e |
could lead to a crash of mutter, since the window has not valid flags (like
|
|
|
657d8e |
workspace) set anymore at this stage.
|
|
|
657d8e |
|
|
|
657d8e |
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/580
|
|
|
657d8e |
|
|
|
657d8e |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/564
|
|
|
657d8e |
|
|
|
657d8e |
|
|
|
657d8e |
(cherry picked from commit a6fc656e917fd48b8708b8d9f4bf9f8b15581313)
|
|
|
657d8e |
---
|
|
|
657d8e |
src/core/window.c | 7 +++++++
|
|
|
657d8e |
1 file changed, 7 insertions(+)
|
|
|
657d8e |
|
|
|
657d8e |
diff --git a/src/core/window.c b/src/core/window.c
|
|
|
657d8e |
index d2c24506b..725cca7ce 100644
|
|
|
657d8e |
--- a/src/core/window.c
|
|
|
657d8e |
+++ b/src/core/window.c
|
|
|
657d8e |
@@ -3683,6 +3683,13 @@ meta_window_activate_full (MetaWindow *window,
|
|
|
657d8e |
{
|
|
|
657d8e |
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
|
|
657d8e |
gboolean allow_workspace_switch;
|
|
|
657d8e |
+
|
|
|
657d8e |
+ if (window->unmanaging)
|
|
|
657d8e |
+ {
|
|
|
657d8e |
+ g_warning ("Trying to activate unmanaged window '%s'", window->desc);
|
|
|
657d8e |
+ return;
|
|
|
657d8e |
+ }
|
|
|
657d8e |
+
|
|
|
657d8e |
meta_topic (META_DEBUG_FOCUS,
|
|
|
657d8e |
"_NET_ACTIVE_WINDOW message sent for %s at time %u "
|
|
|
657d8e |
"by client type %u.\n",
|
|
|
657d8e |
--
|
|
|
657d8e |
2.21.0
|
|
|
657d8e |
|