# HG changeset patch # User Sean Egan # Date 1180572444 0 # Node ID 4b711c5c2db8c234d832d033c9d648bd41cebd12 # Parent ec8a4b674d50d1ad0e022cb7fea9cce7f3bb2e99 Only auto-expand buddies when the mouse is hovering over the middle third of the buddy. This prevents un-intended expanding of buddies when you're only trying to re-order. Fixes #608 diff -r ec8a4b674d50 -r 4b711c5c2db8 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Wed May 30 22:47:51 2007 +0000 +++ b/pidgin/gtkblist.c Thu May 31 00:47:24 2007 +0000 @@ -2721,6 +2721,7 @@ { GtkTreePath *path; int delay; + GdkRectangle rect; /* * When dragging a buddy into a contact, this is the delay before @@ -2736,7 +2737,17 @@ } gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), x, y, &path, NULL, NULL, NULL); - gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, >kblist->tip_rect); + gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &rect); + + /* Only autoexpand when in the middle of the cell to avoid annoying un-intended expands */ + if (y < rect.y + (rect.height / 3) || + y > rect.y + (2 * (rect.height /3))) + return FALSE; + + rect.height = rect.height / 3; + rect.y += rect.height; + + gtkblist->tip_rect = rect; if (path) gtk_tree_path_free(path);