[gtk+] menuitem: don't use content allocation to resize the GdkWindow



commit efb8e5bd434d5bf0fb77867510a5674ee983838c
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Dec 22 15:36:00 2015 -0800

    menuitem: don't use content allocation to resize the GdkWindow
    
    This is a fallout from the gadget conversion.

 gtk/gtkmenuitem.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index a23c25d..10c2cbd 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -406,11 +406,6 @@ gtk_menu_item_allocate (GtkCssGadget        *gadget,
       gdk_rectangle_union (out_clip, &arrow_clip, out_clip);
     }
 
-  if (gtk_widget_get_realized (widget))
-    gdk_window_move_resize (priv->event_window,
-                            allocation->x, allocation->y,
-                            allocation->width, allocation->height);
-
   if (priv->submenu)
     gtk_menu_reposition (GTK_MENU (priv->submenu));
 }
@@ -425,6 +420,11 @@ gtk_menu_item_size_allocate (GtkWidget     *widget,
   
   gtk_widget_set_allocation (widget, allocation);
 
+  if (gtk_widget_get_realized (widget))
+    gdk_window_move_resize (priv->event_window,
+                            allocation->x, allocation->y,
+                            allocation->width, allocation->height);
+
   gtk_css_gadget_allocate (priv->gadget,
                            allocation,
                            gtk_widget_get_allocated_baseline (widget),


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