From 5a535ee7a9d488a608e7934839fa989b804f9577 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 18 Jun 2012 11:26:48 +0200 Subject: [PATCH] empathy_roster_view_query_tooltip: set the tooltip next to the right child This ensures that the tooltip is always displayed next to the correct row. https://bugzilla.gnome.org/show_bug.cgi?id=678294 --- libempathy-gtk/empathy-roster-view.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c index b823b71a..7ae80523 100644 --- a/libempathy-gtk/empathy-roster-view.c +++ b/libempathy-gtk/empathy-roster-view.c @@ -1230,6 +1230,7 @@ empathy_roster_view_query_tooltip (GtkWidget *widget, GtkWidget *child; EmpathyRosterContact *contact; FolksIndividual *individual; + gboolean result; if (self->priv->individual_tooltip_cb == NULL) return FALSE; @@ -1241,8 +1242,18 @@ empathy_roster_view_query_tooltip (GtkWidget *widget, contact = EMPATHY_ROSTER_CONTACT (child); individual = empathy_roster_contact_get_individual (contact); - return self->priv->individual_tooltip_cb (self, individual, keyboard_mode, + result = self->priv->individual_tooltip_cb (self, individual, keyboard_mode, tooltip, self->priv->individual_tooltip_data); + + if (result) + { + GtkAllocation allocation; + + gtk_widget_get_allocation (child, &allocation); + gtk_tooltip_set_tip_area (tooltip, (GdkRectangle *) &allocation); + } + + return result; } void -- 2.39.2