[gtk+] entry: Fix input window position for icons



commit 0cec768b5486e94321fd9c4dfffc1194b0484c5c
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 17 12:04:35 2016 -0500

    entry: Fix input window position for icons
    
    This makes the icon in the placesview address entry and
    in widget-factory's progress entry work again.

 gtk/gtkentry.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 6c5ad6d..2a55109 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3321,9 +3321,6 @@ place_windows (GtkEntry *entry)
   GtkEntryPrivate *priv = entry->priv;
   EntryIconInfo *icon_info;
   GtkAllocation content_allocation;
-  GtkAllocation widget_allocation;
-
-  gtk_widget_get_allocation (GTK_WIDGET (entry), &widget_allocation);
 
   icon_info = priv->icons[GTK_ENTRY_ICON_PRIMARY];
   if (icon_info)
@@ -3332,7 +3329,7 @@ place_windows (GtkEntry *entry)
 
       gtk_css_gadget_get_border_allocation (icon_info->gadget, &primary, NULL);
       gdk_window_move_resize (icon_info->window,
-                              primary.x - widget_allocation.x, primary.y - widget_allocation.y,
+                              primary.x, primary.y,
                               primary.width, primary.height);
     }
 
@@ -3343,7 +3340,7 @@ place_windows (GtkEntry *entry)
 
       gtk_css_gadget_get_border_allocation (icon_info->gadget, &secondary, NULL);
       gdk_window_move_resize (icon_info->window,
-                              secondary.x - widget_allocation.x, secondary.y - widget_allocation.y,
+                              secondary.x, secondary.y,
                               secondary.width, secondary.height);
     }
 


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