[gtk+] quartz: Move initialization code to display_class_init
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: Move initialization code to display_class_init
- Date: Thu, 2 May 2013 14:31:48 +0000 (UTC)
commit f3a5ad32f32558896fea9d24950526775a5565e3
Author: Benjamin Otte <otte redhat com>
Date: Thu May 2 15:43:09 2013 +0200
quartz: Move initialization code to display_class_init
This follows the same reasoning as the X11 backend in commit
0122a9da8eab518652553aa4e777d5caf18a6163
gdk/quartz/gdkdisplay-quartz.c | 13 +++++++++++++
gdk/quartz/gdkdisplaymanager-quartz.c | 12 ------------
2 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 17458fc..3c1a022 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -336,4 +336,17 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->convert_selection = _gdk_quartz_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target;
+
+ ProcessSerialNumber psn = { 0, kCurrentProcess };
+ void (*_gtk_quartz_framework_init_ptr) (void);
+
+ /* Make the current process a foreground application, i.e. an app
+ * with a user interface, in case we're not running from a .app bundle
+ */
+ TransformProcessType (&psn, kProcessTransformToForegroundApplication);
+
+ /* Initialize GTK+ framework if there is one. */
+ _gtk_quartz_framework_init_ptr = dlsym (RTLD_DEFAULT, "_gtk_quartz_framework_init");
+ if (_gtk_quartz_framework_init_ptr)
+ _gtk_quartz_framework_init_ptr ();
}
diff --git a/gdk/quartz/gdkdisplaymanager-quartz.c b/gdk/quartz/gdkdisplaymanager-quartz.c
index d8ba138..0b772db 100644
--- a/gdk/quartz/gdkdisplaymanager-quartz.c
+++ b/gdk/quartz/gdkdisplaymanager-quartz.c
@@ -43,18 +43,6 @@ G_DEFINE_TYPE (GdkQuartzDisplayManager, gdk_quartz_display_manager, GDK_TYPE_DIS
static void
gdk_quartz_display_manager_init (GdkQuartzDisplayManager *manager)
{
- ProcessSerialNumber psn = { 0, kCurrentProcess };
- void (*_gtk_quartz_framework_init_ptr) (void);
-
- /* Make the current process a foreground application, i.e. an app
- * with a user interface, in case we're not running from a .app bundle
- */
- TransformProcessType (&psn, kProcessTransformToForegroundApplication);
-
- /* Initialize GTK+ framework if there is one. */
- _gtk_quartz_framework_init_ptr = dlsym (RTLD_DEFAULT, "_gtk_quartz_framework_init");
- if (_gtk_quartz_framework_init_ptr)
- _gtk_quartz_framework_init_ptr ();
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]