Remove race condition for focus window choice on window close followed by

2004-09-15  Elijah Newren  <newren@math.utah.edu>

	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
This commit is contained in:
Elijah Newren 2004-09-15 15:54:51 +00:00 committed by Elijah Newren
parent a880f5d401
commit 5ac6fcad73
2 changed files with 11 additions and 24 deletions

View File

@ -1,3 +1,13 @@
2004-09-15 Elijah Newren <newren@math.utah.edu>
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 <newren@math.utah.edu> 2004-09-15 Elijah Newren <newren@math.utah.edu>
Fix unwanted loss of focus to the mouse window when using keynav Fix unwanted loss of focus to the mouse window when using keynav

View File

@ -1085,13 +1085,7 @@ meta_window_free (MetaWindow *window)
g_object_unref (G_OBJECT (window->mini_icon)); g_object_unref (G_OBJECT (window->mini_icon));
meta_icon_cache_free (&window->icon_cache); 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->sm_client_id);
g_free (window->wm_client_machine); g_free (window->wm_client_machine);
g_free (window->startup_id); g_free (window->startup_id);
@ -1503,23 +1497,6 @@ idle_calc_showing (gpointer data)
{ {
MetaWindow *window = tmp->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) if (g_slist_find (displays, window->display) == NULL)
{ {
displays = g_slist_prepend (displays, window->display); displays = g_slist_prepend (displays, window->display);