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
This commit is contained in:
Elijah Newren 2004-08-27 17:22:54 +00:00 committed by Elijah Newren
parent b682a9f945
commit 522e9916b6
3 changed files with 27 additions and 2 deletions

View File

@ -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

View File

@ -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
{

View File

@ -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;