Mon, 29 Oct 2007 00:09:18 +0000
merge of '09118de8bda6a45533b18397833d5af9d8ee0fef'
and '6b574c662336abf124cd127be8c95ffd38b5a9ff'
--- a/pidgin/gtkblist.c Sun Oct 28 17:27:07 2007 +0000 +++ b/pidgin/gtkblist.c Mon Oct 29 00:09:18 2007 +0000 @@ -111,7 +111,7 @@ static GtkWidget *accountmenu = NULL; static guint visibility_manager_count = 0; -static gboolean gtk_blist_obscured = FALSE; +static GdkVisibilityState gtk_blist_visibility = GDK_VISIBILITY_UNOBSCURED; static gboolean editing_blist = FALSE; static GList *pidgin_blist_sort_methods = NULL; @@ -174,11 +174,14 @@ ***************************************************/ static gboolean gtk_blist_visibility_cb(GtkWidget *w, GdkEventVisibility *event, gpointer data) { - if (event->state == GDK_VISIBILITY_FULLY_OBSCURED) - gtk_blist_obscured = TRUE; - else if (gtk_blist_obscured) { - gtk_blist_obscured = FALSE; - pidgin_blist_refresh_timer(purple_get_blist()); + GdkVisibilityState old_state = gtk_blist_visibility; + gtk_blist_visibility = event->state; + + if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED && + old_state != GDK_VISIBILITY_FULLY_OBSCURED) { + + /* no longer fully obscured */ + pidgin_blist_refresh_timer(purple_get_blist()); } /* continue to handle event normally */ @@ -3765,7 +3768,8 @@ { PurpleBlistNode *gnode, *cnode; - if (gtk_blist_obscured || !GTK_WIDGET_VISIBLE(gtkblist->window)) + if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED + || !GTK_WIDGET_VISIBLE(gtkblist->window)) return TRUE; for(gnode = list->root; gnode; gnode = gnode->next) { @@ -6328,7 +6332,8 @@ { if (gtkblist && gtkblist->window) { if (GTK_WIDGET_VISIBLE(gtkblist->window)) { - purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || gtk_blist_obscured); + purple_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || + gtk_blist_visibility != GDK_VISIBILITY_UNOBSCURED); } else { purple_blist_set_visible(TRUE); }