diff --git a/ChangeLog b/ChangeLog index 789d636f6..a12c06605 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-08-27 Elijah Newren + + 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 + 2004-08-26 Havoc Pennington * src/frame.c: delete extra copy of find_argb_visual so things diff --git a/src/window.c b/src/window.c index e8ab0bb12..41988685c 100644 --- a/src/window.c +++ b/src/window.c @@ -7298,9 +7298,9 @@ meta_window_stack_just_below (MetaWindow *window, meta_topic (META_DEBUG_STACK, "Setting stack position of window %s to %d (making it below window %s).\n", window->desc, - below_this_one->stack_position - 1, + below_this_one->stack_position, below_this_one->desc); - meta_window_set_stack_position (window, below_this_one->stack_position - 1); + meta_window_set_stack_position (window, below_this_one->stack_position); } else { diff --git a/src/workspace.c b/src/workspace.c index d70109859..04f374c8c 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;