2006-12-03  Federico Mena Quintero  <federico@novell.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:

	* src/window.c (idle_calc_showing): Grab the server while the
	windows are being shuffled.  First show the windows to be shown,
	and then hide the windows to be hidden, in order to minimize
	the number of expose events.
This commit is contained in:
Federico Mena Quintero 2006-12-03 20:05:23 +00:00 committed by Federico Mena Quintero
parent 106391a431
commit caf43a123f
2 changed files with 28 additions and 12 deletions

View File

@ -1,3 +1,12 @@
2006-12-03 Federico Mena Quintero <federico@novell.com>
Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:
* src/window.c (idle_calc_showing): Grab the server while the
windows are being shuffled. First show the windows to be shown,
and then hide the windows to be hidden, in order to minimize
the number of expose events.
2006-11-15 Bruno Boaventura <brunoboaventura@gmail.com>
2006-11-15 Björn Lindqvist <bjourne@gmail.com>

View File

@ -1457,6 +1457,7 @@ idle_calc_showing (gpointer data)
GSList *should_hide;
GSList *unplaced;
GSList *displays;
MetaWindow *first_window;
meta_topic (META_DEBUG_WINDOW_STATE,
"Clearing the calc_showing queue\n");
@ -1506,6 +1507,10 @@ idle_calc_showing (gpointer data)
should_show = g_slist_sort (should_show, stackcmp);
should_show = g_slist_reverse (should_show);
first_window = copy->data;
meta_display_grab (first_window->display);
tmp = unplaced;
while (tmp != NULL)
{
@ -1518,18 +1523,6 @@ idle_calc_showing (gpointer data)
tmp = tmp->next;
}
tmp = should_hide;
while (tmp != NULL)
{
MetaWindow *window;
window = tmp->data;
implement_showing (window, FALSE);
tmp = tmp->next;
}
tmp = should_show;
while (tmp != NULL)
{
@ -1542,6 +1535,18 @@ idle_calc_showing (gpointer data)
tmp = tmp->next;
}
tmp = should_hide;
while (tmp != NULL)
{
MetaWindow *window;
window = tmp->data;
implement_showing (window, FALSE);
tmp = tmp->next;
}
tmp = copy;
while (tmp != NULL)
{
@ -1578,6 +1583,8 @@ idle_calc_showing (gpointer data)
}
}
meta_display_ungrab (first_window->display);
g_slist_free (copy);
g_slist_free (unplaced);