summaryrefslogtreecommitdiff
path: root/src/workspace.c
diff options
context:
space:
mode:
authorElijah Newren <newren@math.utah.edu>2004-08-27 17:22:54 +0000
committerElijah Newren <newren@src.gnome.org>2004-08-27 17:22:54 +0000
commit522e9916b6a43d68bfae4ab7b2ebf7ed56f5d644 (patch)
treecf887bf274201181c767b55f662efb02a1c495b9 /src/workspace.c
parentb682a9f94558d17deca4ce9cac102fdeb77620ca (diff)
downloadmetacity-522e9916b6a43d68bfae4ab7b2ebf7ed56f5d644.tar.gz
Prevent an assertion failure that can occur after increasing the number of
2004-08-27 Elijah Newren <newren@math.utah.edu> Prevent an assertion failure that can occur after increasing the number of workspaces; also fix a warning and stacking order when a window is denied focus (fixes #150615) * src/window.c (meta_window_stack_just_below): the position of the window should be set equal to that of the one we want to be below, not 1 lower than that number * src/workspace.c (maybe_add_to_list): new function to add on_all_workspace windows to an mru_list, (meta_workspace_new): call maybe_add_to_list for all windows on the screen in order to initialize the mru_list
Diffstat (limited to 'src/workspace.c')
-rw-r--r--src/workspace.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/workspace.c b/src/workspace.c
index d7010985..04f374c8 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -31,6 +31,15 @@ void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
static void set_active_space_hint (MetaScreen *screen);
+static void
+maybe_add_to_list (MetaScreen *screen, MetaWindow *window, gpointer data)
+{
+ GList **mru_list = data;
+
+ if (window->on_all_workspaces)
+ *mru_list = g_list_prepend (*mru_list, window);
+}
+
MetaWorkspace*
meta_workspace_new (MetaScreen *screen)
{
@@ -43,6 +52,7 @@ meta_workspace_new (MetaScreen *screen)
g_list_append (workspace->screen->workspaces, workspace);
workspace->windows = NULL;
workspace->mru_list = NULL;
+ meta_screen_foreach_window (screen, maybe_add_to_list, &workspace->mru_list);
workspace->work_areas = NULL;
workspace->work_areas_invalid = TRUE;