[gtk/wip/carlosg/texthandles-position] gtkentry: Fix text handle coordinates calculation



commit a15325ef44d8f473942bba06e076345792246732
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Jan 29 12:00:07 2019 +0100

    gtkentry: Fix text handle coordinates calculation
    
    The text allocation is already in widget-local coordinates, involving the
    GtkAllocation here is not right.

 gtk/gtkentry.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 26fe36b100..f5231424e4 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3536,12 +3536,10 @@ gtk_entry_move_handle (GtkEntry              *entry,
     }
   else
     {
-      GtkAllocation allocation;
       GdkRectangle rect;
 
-      gtk_widget_get_allocation (GTK_WIDGET (entry), &allocation);
-      rect.x = x + text_allocation.x - allocation.x;
-      rect.y = y + text_allocation.y - allocation.y;
+      rect.x = x + text_allocation.x;
+      rect.y = y + text_allocation.y;
       rect.width = 1;
       rect.height = height;
 


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