diff options
author | Elijah Newren <newren@math.utah.edu> | 2004-08-27 17:22:54 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2004-08-27 17:22:54 +0000 |
commit | 522e9916b6a43d68bfae4ab7b2ebf7ed56f5d644 (patch) | |
tree | cf887bf274201181c767b55f662efb02a1c495b9 | |
parent | b682a9f94558d17deca4ce9cac102fdeb77620ca (diff) | |
download | metacity-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
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/window.c | 4 | ||||
-rw-r--r-- | src/workspace.c | 10 |
3 files changed, 27 insertions, 2 deletions
@@ -1,3 +1,18 @@ +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 + 2004-08-26 Havoc Pennington <hp@redhat.com> * src/frame.c: delete extra copy of find_argb_visual so things diff --git a/src/window.c b/src/window.c index e8ab0bb1..41988685 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 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; |