[gtk+/wip/attachment-rectangle] menu: only set type hint if unmapped



commit c570fcf2323b730d6324ce3cac89fbf9a6f107dc
Author: William Hua <william hua canonical com>
Date:   Wed Aug 26 14:08:12 2015 +0100

    menu: only set type hint if unmapped

 gtk/gtkmenu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index eff9315..c1c10ea 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -4569,8 +4569,9 @@ gtk_menu_position (GtkMenu  *menu,
   GdkRectangle allocation;
 
   gtk_widget_realize (priv->toplevel);
+  if (!gtk_widget_get_mapped (priv->toplevel))
+    gtk_window_set_type_hint (GTK_WINDOW (priv->toplevel), GDK_WINDOW_TYPE_HINT_POPUP_MENU);
   menu_window = gtk_widget_get_window (priv->toplevel);
-  gtk_window_set_type_hint (GTK_WINDOW (priv->toplevel), GDK_WINDOW_TYPE_HINT_POPUP_MENU);
 
   if (menu_window)
     {


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