[gnome-shell] shell/app: Don't move all workspace windows to their startup workspace
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell/app: Don't move all workspace windows to their startup workspace
- Date: Sat, 30 Oct 2021 11:51:46 +0000 (UTC)
commit bc32a5210823c40016084c1d128c3113015e08cf
Author: Sebastian Keller <skeller gnome org>
Date: Sat Oct 30 13:21:17 2021 +0200
shell/app: Don't move all workspace windows to their startup workspace
Windows from some applications, such as guake, are created as showing on
all workspaces. When these windows are put on the workspaces via
set_workspace_state() during construction, the first time the window is
added to a workspace in the loop triggers the shell app tracker which
then tries to move the window to its startup workspace. This makes the
window unsticky which triggers another set_workspace_state() which
tries to remove the window from all workspaces, but currently it is only
on the first one and then adds it to the startup workspace. Once that is
finished, the first set_workspace_state() continues adding the window
to the remaining workspaces, despite the window now no longer having
on_all_workspaces set to true.
When the window is now unmanaged, the window according to its internal
state is only found on the startup workspace, so it will only be removed
from that. This causes the assertion to fail that checks that the window
is no longer present on any workspace after this.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4720
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2014>
src/shell-app.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index 1dfd82d8e4..1e3b53257f 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1126,7 +1126,7 @@ _shell_app_add_window (ShellApp *app,
app->running_state->interesting_windows++;
shell_app_sync_running_state (app);
- if (app->started_on_workspace >= 0)
+ if (app->started_on_workspace >= 0 && !meta_window_is_on_all_workspaces (window))
meta_window_change_workspace_by_index (window, app->started_on_workspace, FALSE);
app->started_on_workspace = -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]