Set the root coordinates in the event correctly. Patch by Kristian

* gtk/gtktooltip.c (gtk_tooltip_trigger_query): Set the root
        coordinates in the event correctly. Patch by Kristian Rietveld.


svn path=/trunk/; revision=22277
This commit is contained in:
Matthias Clasen 2009-02-04 01:16:35 +00:00
parent 7fd058b637
commit 4995ea0fcb
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2009-02-03 Matthias Clasen <mclasen@redhat.com>
Bug 538439 tooltip may appear in upper left corner instead of
over widget
* gtk/gtktooltip.c (gtk_tooltip_trigger_query): Set the root
coordinates in the event correctly. Patch by Kristian Rietveld.
2009-02-02 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version

View File

@ -440,6 +440,10 @@ gtk_tooltip_trigger_tooltip_query (GdkDisplay *display)
event.motion.y = y;
event.motion.is_hint = FALSE;
gdk_window_get_origin (window, &x, &y);
event.motion.x_root = event.motion.x + x;
event.motion.y_root = event.motion.y + y;
_gtk_tooltip_handle_event (&event);
}
@ -518,6 +522,9 @@ child_location_foreach (GtkWidget *child,
if (!GTK_WIDGET_DRAWABLE (child))
return;
x = 0;
y = 0;
/* (child_loc->x, child_loc->y) are relative to
* child_loc->container's allocation.
*/