add paranoia check to make sure a window is really on a workspace before

2003-11-16  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_notify_focus): add paranoia check to
	make sure a window is really on a workspace before inserting it at
	the beginning of the MRU list.  Maybe there's a race condition
	with focusing and workspace switching.  Hopefully a fix for #122016.
This commit is contained in:
Rob Adams 2003-11-16 21:50:51 +00:00 committed by Rob Adams
parent d5083baea0
commit 67c36f0917
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2003-11-16 Rob Adams <readams@readams.net>
* src/window.c (meta_window_notify_focus): add paranoia check to
make sure a window is really on a workspace before inserting it at
the beginning of the MRU list. Maybe there's a race condition
with focusing and workspace switching. Hopefully a fix for
#122016.
2003-11-15 Havoc Pennington <hp@redhat.com>
* src/main.c (main): fix warning

View File

@ -4046,10 +4046,10 @@ meta_window_notify_focus (MetaWindow *window,
window->has_focus = TRUE;
/* Move to the front of the focusing workspace's MRU list
* FIXME: is the active workspace guaranteed to be the focusing
* workspace?
*/
if (window->screen->active_workspace)
if (window->screen->active_workspace &&
g_list_find (window->screen->active_workspace->mru_list,
window))
{
window->screen->active_workspace->mru_list =
g_list_remove (window->screen->active_workspace->mru_list,