mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
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:
@ -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,
|
||||
|
Reference in New Issue
Block a user