From ca20b04b5884af23a0cd896902d2641f7b608c08 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 7 Oct 2009 18:54:47 +0200 Subject: [PATCH] Move screen initialization to gdkscreen-quartz.c --- gdk/quartz/gdkdisplay-quartz.c | 3 +-- gdk/quartz/gdkprivate-quartz.h | 3 +++ gdk/quartz/gdkscreen-quartz.c | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c index 9dbd93f18e..fd38da1312 100644 --- a/gdk/quartz/gdkdisplay-quartz.c +++ b/gdk/quartz/gdkdisplay-quartz.c @@ -57,8 +57,7 @@ gdk_display_open (const gchar *display_name) gdk_screen_set_resolution (_gdk_screen, 72.0 * [nsscreen userSpaceScaleFactor]); _gdk_visual_init (); - gdk_screen_set_default_colormap (_gdk_screen, - gdk_screen_get_system_colormap (_gdk_screen)); + _gdk_quartz_screen_init (); _gdk_windowing_window_init (); _gdk_events_init (); diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h index 52834b36d5..86db886fbc 100644 --- a/gdk/quartz/gdkprivate-quartz.h +++ b/gdk/quartz/gdkprivate-quartz.h @@ -152,6 +152,9 @@ void _gdk_quartz_window_debug_highlight (GdkWindow *window, void _gdk_quartz_window_set_needs_display_in_rect (GdkWindow *window, GdkRectangle *rect); +/* Screen */ +void _gdk_quartz_screen_init (void); + /* Events */ typedef enum { GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP diff --git a/gdk/quartz/gdkscreen-quartz.c b/gdk/quartz/gdkscreen-quartz.c index 30cd73edda..6d6197514c 100644 --- a/gdk/quartz/gdkscreen-quartz.c +++ b/gdk/quartz/gdkscreen-quartz.c @@ -24,6 +24,13 @@ static GdkColormap *default_colormap = NULL; +void +_gdk_quartz_screen_init (void) +{ + gdk_screen_set_default_colormap (_gdk_screen, + gdk_screen_get_system_colormap (_gdk_screen)); +} + GdkDisplay * gdk_screen_get_display (GdkScreen *screen) {