From caf43a123f40d3a68599ac5453a79759b828e8f0 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Sun, 3 Dec 2006 20:05:23 +0000 Subject: Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127: 2006-12-03 Federico Mena Quintero 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. --- ChangeLog | 9 +++++++++ src/window.c | 15 +++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45db5211..3d9bab48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-12-03 Federico Mena Quintero + + 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 2006-11-15 Björn Lindqvist diff --git a/src/window.c b/src/window.c index b7a13b29..0e639969 100644 --- a/src/window.c +++ b/src/window.c @@ -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"); @@ -1505,6 +1506,10 @@ idle_calc_showing (gpointer data) /* top to bottom */ 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,26 +1523,26 @@ idle_calc_showing (gpointer data) tmp = tmp->next; } - tmp = should_hide; + tmp = should_show; while (tmp != NULL) { MetaWindow *window; window = tmp->data; - implement_showing (window, FALSE); + implement_showing (window, TRUE); tmp = tmp->next; } - tmp = should_show; + tmp = should_hide; while (tmp != NULL) { MetaWindow *window; window = tmp->data; - implement_showing (window, TRUE); + implement_showing (window, FALSE); tmp = tmp->next; } @@ -1578,6 +1583,8 @@ idle_calc_showing (gpointer data) } } + meta_display_ungrab (first_window->display); + g_slist_free (copy); g_slist_free (unplaced); -- cgit v1.2.3