Mercurial > pidgin.yaz
changeset 21043:6b9e304272e4
merge of '02ceb2c6297e1fffb5870c6755ddc0ae3a864eee'
and '4561f543b579b6485a54303645c94851c3da527d'
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Mon, 29 Oct 2007 00:09:18 +0000 |
parents | 094bbbe89d0d (diff) b3ae0eb23df3 (current diff) |
children | 6b02dba5bf41 |
files | |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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); }