We use a timeout in our blist selection changed callback to prevent buddy

Sun, 03 Jun 2007 18:22:15 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sun, 03 Jun 2007 18:22:15 +0000
changeset 17542
6179ea7a4334
parent 17536
b04036df5ac6
child 17543
c24f833ccb90

We use a timeout in our blist selection changed callback to prevent buddy
list flickering when scrolling through the list, but this appears to be the
root cause of buddies sometimes being rendered "half height". Ticket #1511
managed to narrow it down to happening when collapsing (or expanding) a
group below the currently selected node, so I made it so the timeout is
only used when the new selection is not a group node. Fixes #1511

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Sun Jun 03 01:05:59 2007 +0000
+++ b/pidgin/gtkblist.c	Sun Jun 03 18:22:15 2007 +0000
@@ -4737,8 +4737,15 @@
 				NODE_COLUMN, &new_selection, -1);
 	}
 
-	/* we set this up as a timeout, otherwise the blist flickers */
-	g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection);
+	/* we set this up as a timeout, otherwise the blist flickers ...
+	 * but we don't do it for groups, because it causes total bizarness -
+	 * the previously selected buddy node might rendered at half height.
+	 */
+	if ((new_selection != NULL) && PURPLE_BLIST_NODE_IS_GROUP(new_selection)) {
+		do_selection_changed(new_selection);
+	} else {
+		g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection);
+	}
 }
 
 static gboolean insert_node(PurpleBuddyList *list, PurpleBlistNode *node, GtkTreeIter *iter)

mercurial