[gtk+/gtk-3-22] a11y/entry: Fixups for previous commit



commit 6018f9098e04bcdd0b512770460ac0356942b4a9
Author: Daniel Boles <dboles src gnome org>
Date:   Sun Oct 15 12:55:22 2017 +0100

    a11y/entry: Fixups for previous commit
    
    We still declare all variables at the start of the block.
    
    Also, we can use the fast private _gtk_widget_get_allocation().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784509

 gtk/a11y/gtkentryaccessible.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtkentryaccessible.c b/gtk/a11y/gtkentryaccessible.c
index 021f43e..d66d988 100644
--- a/gtk/a11y/gtkentryaccessible.c
+++ b/gtk/a11y/gtkentryaccessible.c
@@ -25,6 +25,7 @@
 #include "gtkentryprivate.h"
 #include "gtkcomboboxaccessible.h"
 #include "gtkstylecontextprivate.h"
+#include "gtkwidgetprivate.h"
 
 #define GTK_TYPE_ENTRY_ICON_ACCESSIBLE      (gtk_entry_icon_accessible_get_type ())
 #define GTK_ENTRY_ICON_ACCESSIBLE(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GTK_TYPE_ENTRY_ICON_ACCESSIBLE, GtkEntryIconAccessible))
@@ -958,6 +959,7 @@ gtk_entry_accessible_get_character_extents (AtkText      *text,
   gint index, x_layout, y_layout;
   GdkWindow *window;
   gint x_window, y_window;
+  GtkAllocation allocation;
 
   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
   if (widget == NULL)
@@ -973,8 +975,7 @@ gtk_entry_accessible_get_character_extents (AtkText      *text,
   pango_layout_index_to_pos (gtk_entry_get_layout (entry), index, &char_rect);
   pango_extents_to_pixels (&char_rect, NULL);
 
-  GtkAllocation allocation;
-  gtk_widget_get_allocation (widget, &allocation);
+  _gtk_widget_get_allocation (widget, &allocation);
 
   window = gtk_widget_get_window (widget);
   gdk_window_get_origin (window, &x_window, &y_window);


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