From b298190f63af35003e59145f8ce570a9e8bfbb13 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 12 Jul 2019 18:56:15 +0200
Subject: [PATCH] Revert ""]Quartz] Set the popup menu type hint before
 realizing the popup.""

This reverts commit 13e64aa1032ad6c41f8061a0b64e54ef7e970344.
---
 gtk/gtkmenu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 32ed9b3f45..f12deb52ff 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -5268,15 +5268,15 @@ gtk_menu_position (GtkMenu  *menu,
                                          !!(anchor_hints & GDK_ANCHOR_RESIZE_X),
                                          !!(anchor_hints & GDK_ANCHOR_RESIZE_Y));
 
-  if (!gtk_widget_get_visible (priv->toplevel))
-    gtk_window_set_type_hint (GTK_WINDOW (priv->toplevel), priv->menu_type_hint);
-
   /* Realize so we have the proper width and height to figure out
    * the right place to popup the menu.
    */
   gtk_widget_realize (priv->toplevel);
   gtk_window_move_resize (GTK_WINDOW (priv->toplevel));
 
+  if (!gtk_widget_get_visible (priv->toplevel))
+    gtk_window_set_type_hint (GTK_WINDOW (priv->toplevel), priv->menu_type_hint);
+
   if (text_direction == GTK_TEXT_DIR_NONE)
     text_direction = gtk_widget_get_direction (GTK_WIDGET (menu));
 
-- 
2.22.0

