From 63fdf8bcb83ad736ca9673217e958f20ddd46425 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 29 Jul 2013 10:15:01 +0200 Subject: [PATCH] MetaWindow: don't set focus to unmanaged window Closing the last window causes the no-focus window to gain focus, which causes mutter to unfocus the just closed window, and that crashes. As focusing a window that is about to be destroyed does not make sense, avoid a crash in this case. Note: this is probably a reference counting bug in MetaWayland actually. --- src/core/window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 870ce5b49..63133308d 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -7399,6 +7399,9 @@ void meta_window_set_focused_internal (MetaWindow *window, gboolean focused) { + if (window->unmanaging) + return; + if (focused) { window->has_focus = TRUE;