[gtk/master-eventloop-fix] move [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initialization issue



commit 771e56a369177ce81c47998d374d1fed287b1a6c
Author: Oleksii Samorukov <samm os2 kiev ua>
Date:   Sun Jan 5 21:02:37 2020 +0100

    move [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initialization issues
    
    (cherry picked from commit 46c2451c5a3cd42aa5a94935bfc850a484288ff3)

 gdk/quartz/gdkdisplay-quartz.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 3420801978..5b4b3c99ed 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -55,9 +55,6 @@ _gdk_quartz_display_open (const gchar *display_name)
   if (_gdk_display != NULL)
     return NULL;
 
-  /* Initialize application */
-  [NSApplication sharedApplication];
-
   _gdk_display = g_object_new (gdk_quartz_display_get_type (), NULL);
   _gdk_device_manager = _gdk_device_manager_new (_gdk_display);
 
@@ -67,6 +64,8 @@ _gdk_quartz_display_open (const gchar *display_name)
 
   _gdk_quartz_events_init ();
 
+  /* Initialize application */
+  [NSApplication sharedApplication];
 #if 0
   /* FIXME: Remove the #if 0 when we have these functions */
   _gdk_quartz_dnd_init ();


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