diff pidgin/gtkblist.c @ 17674:0e4a789cd027

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
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 03 Jun 2007 18:22:15 +0000
parents 45178b7e580d
children 677a57f12e28 486daeb90aa9
line wrap: on
line diff
--- 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)