]> Pileus Git - ~andy/gtk/commitdiff
GtkRange: use the right widget for coordinate translation
authorCosimo Cecchi <ccechi@redhat.com>
Fri, 21 Oct 2011 20:30:34 +0000 (16:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Oct 2011 20:30:34 +0000 (16:30 -0400)
GtkRange needs to check if its allocation intersects with the resize
grip allocation (trimming its own allocation if it does).
In order to do that, it needs to translate its allocation into window
coordinates, and before that, find the window to whose the allocation
is relative; code goes all the way finding the right parent widget, but
then doesn't actually use it when translating the coordinates, leading
to using the wrong rectangles for the intersection check.

https://bugzilla.gnome.org/show_bug.cgi?id=662308

gtk/gtkrange.c

index 96e54c6668c0e7239f8cc3280219dc11420f586f..94594ddc9f22be189f87a91e688d0b19f84b7fed 100644 (file)
@@ -1618,7 +1618,7 @@ modify_allocation_for_window_grip (GtkWidget     *widget,
     translated_rect = *allocation;
   else
     {
-      gtk_widget_translate_coordinates (gtk_widget_get_parent (widget),
+      gtk_widget_translate_coordinates (parent,
                                         window,
                                         allocation->x, allocation->y,
                                         &x, &y);