GtkRange: use the right widget for coordinate translation

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
This commit is contained in:
Cosimo Cecchi 2011-10-21 16:30:34 -04:00 committed by Matthias Clasen
parent 958fc69494
commit 18a638a7d3

View 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);