[gtk+] GtkRange: use the right widget for coordinate translation



commit 18a638a7d38178a85cc2ee868f601e0bb454c797
Author: Cosimo Cecchi <ccechi redhat com>
Date:   Fri Oct 21 16:30:34 2011 -0400

    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

 gtk/gtkrange.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 96e54c6..94594dd 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]