From 5ac6fcad730679e8f3b6fc41b501ef8b53bb06a8 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Wed, 15 Sep 2004 15:54:51 +0000 Subject: [PATCH] Remove race condition for focus window choice on window close followed by 2004-09-15 Elijah Newren Remove race condition for focus window choice on window close followed by rapid mouse movement in sloppy and mouse focus modes (fixes #152000) * src/window.c (meta_window_free): Don't increment the focus sentinel for windows being freed, (idle_calc_showing): don't increment the focus sentinel for windows being minimized --- ChangeLog | 10 ++++++++++ src/window.c | 25 +------------------------ 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 928fc023c..805cb9ca0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-09-15 Elijah Newren + + Remove race condition for focus window choice on window close + followed by rapid mouse movement in sloppy and mouse focus modes + (fixes #152000) + + * src/window.c (meta_window_free): Don't increment the focus + sentinel for windows being freed, (idle_calc_showing): don't + increment the focus sentinel for windows being minimized + 2004-09-15 Elijah Newren Fix unwanted loss of focus to the mouse window when using keynav diff --git a/src/window.c b/src/window.c index ab9cfff58..a3a707eda 100644 --- a/src/window.c +++ b/src/window.c @@ -1085,13 +1085,7 @@ meta_window_free (MetaWindow *window) g_object_unref (G_OBJECT (window->mini_icon)); meta_icon_cache_free (&window->icon_cache); - - /* Avoid a race condition between the focusing of the mru window and the - * mouse entering the window beneath the one closed in sloppy/mouse focus - * modes. - */ - meta_display_increment_focus_sentinel (window->display); - + g_free (window->sm_client_id); g_free (window->wm_client_machine); g_free (window->startup_id); @@ -1503,23 +1497,6 @@ idle_calc_showing (gpointer data) { MetaWindow *window = tmp->data; - if (g_slist_find (displays, window->display) == NULL) - { - displays = g_slist_prepend (displays, window->display); - meta_display_increment_focus_sentinel (window->display); - } - - tmp = tmp->next; - } - /* There's also a potential race condition on window minimize. - * So we need to avoid that to, in the same manner. As with the - * case above, this race condition is only for sloppy/mouse focus. - */ - tmp = should_hide; - while (tmp != NULL) - { - MetaWindow *window = tmp->data; - if (g_slist_find (displays, window->display) == NULL) { displays = g_slist_prepend (displays, window->display);