From 54f803dfee1c1896c97bdc79b289d6e742212dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 17 Nov 2021 19:17:59 +0100 Subject: [PATCH] shell/window-tracker: Track all initial windows meta_workspace_list_windows() doesn't include OR windows, so go through the newly added meta_display_list_all_windows() instead. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4751 Part-of: --- src/shell-window-tracker.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index 11e777d5d..a8c85edc7 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -592,26 +592,12 @@ static void load_initial_windows (ShellWindowTracker *tracker) { MetaDisplay *display = shell_global_get_display (shell_global_get ()); - MetaWorkspaceManager *workspace_manager = - meta_display_get_workspace_manager (display); - GList *workspaces; + g_autoptr (GList) windows = NULL; GList *l; - workspaces = meta_workspace_manager_get_workspaces (workspace_manager); - for (l = workspaces; l; l = l->next) - { - MetaWorkspace *workspace = l->data; - GList *windows = meta_workspace_list_windows (workspace); - GList *window_iter; - - for (window_iter = windows; window_iter; window_iter = window_iter->next) - { - MetaWindow *window = window_iter->data; - track_window (tracker, window); - } - - g_list_free (windows); - } + windows = meta_display_list_all_windows (display); + for (l = windows; l; l = l->next) + track_window (tracker, l->data); } static void