diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c index 957bb43bef..9bbe60d3d5 100644 --- a/gdk/quartz/gdkdisplay-quartz.c +++ b/gdk/quartz/gdkdisplay-quartz.c @@ -57,9 +57,6 @@ gdk_display_open (const gchar *display_name) _gdk_screen = _gdk_screen_quartz_new (); - nsscreen = [[NSScreen screens] objectAtIndex:0]; - gdk_screen_set_resolution (_gdk_screen, 72.0 * [nsscreen userSpaceScaleFactor]); - _gdk_windowing_window_init (); _gdk_events_init (); diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c index 4c08109500..68ca3776ce 100644 --- a/gdk/quartz/gdkscreen-quartz.c +++ b/gdk/quartz/gdkscreen-quartz.c @@ -47,10 +47,15 @@ static void _gdk_screen_quartz_init (GdkScreenQuartz *screen_quartz) { GdkScreen *screen = GDK_SCREEN (screen_quartz); + NSScreen *nsscreen; gdk_screen_set_default_colormap (screen, gdk_screen_get_system_colormap (screen)); + nsscreen = [[NSScreen screens] objectAtIndex:0]; + gdk_screen_set_resolution (screen, + 72.0 * [nsscreen userSpaceScaleFactor]); + gdk_screen_quartz_calculate_layout (screen_quartz); CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,