From 97f142d1cc2fa5ba2182081c54abd890a2cf449b Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 29 Jan 2018 16:58:46 +0100 Subject: [PATCH] =?UTF-8?q?x11/window:=20Mark=20restored=20workspace=20as?= =?UTF-8?q?=20=E2=80=9Cset=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a window's workspace is not NULL, on_all_workspace should be FALSE. Similarly, when on_all_workspace is TRUE, the window workspace should be NULL. This is an assumption in multiple places in the code, including when setting the workspace state, the window is either added or removed from all workspaces only if the window's workspace is NULL. This rule is initially enforced at creation in _meta_window_shared_new() when a initial workspace is set. However, when the initial workspace is set from the session info, the initial workspace is not marked as “set” which leads to an assertion failure when unmanaging windows, because the window is not removed from all the workspaces. When applying the session info to a window, mark the workspace as “set”. https://gitlab.gnome.org/GNOME/mutter/issues/4 Closes: #4 --- src/x11/window-x11.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index bb84cdafc..74dc16571 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -461,6 +461,7 @@ meta_window_apply_session_info (MetaWindow *window, MetaWorkspace *workspace = spaces->data; meta_window_change_workspace (window, workspace); + window->initial_workspace_set = TRUE; meta_topic (META_DEBUG_SM, "Restoring saved window %s to workspace %d\n",