[PATCH 40/54] Quartz: Move PseudoramiX initialisation to DDX

Daniel Stone daniel at fooishbar.org
Mon Jul 9 18:03:24 PDT 2012


As PseudoramiX is a DDX-specific extension, move its loading and
initialisation to hw/xquartz.  This creates a QuartzExtensionInit()
similar in spirit to xf86ExtensionInit.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
Acked-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 hw/xquartz/quartz.c |   19 +++++++++++++++++++
 mi/miinitext.c      |    5 -----
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 62a2852..3de223b 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -42,6 +42,7 @@
 #include "darwin.h"
 #include "darwinEvents.h"
 #include "pseudoramiX.h"
+#include "extension.h"
 #define _APPLEWM_SERVER_
 #include "applewmExt.h"
 
@@ -143,6 +144,22 @@ QuartzSetupScreen(int index,
     return TRUE;
 }
 
+static const ExtensionModule quartzExtensions[] = {
+    { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension, NULL },
+};
+
+/*
+ * QuartzExtensionInit
+ * Initialises XQuartz-specific extensions.
+ */
+void QuartzExtensionInit(void)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(quartzExtensions); i++)
+        LoadExtension(&quartzExtensions[i], TRUE);
+}
+
 /*
  * QuartzInitOutput
  *  Quartz display initialization.
@@ -182,6 +199,8 @@ QuartzInitOutput(int argc,
 
     // Do display mode specific initialization
     quartzProcs->DisplayInit();
+
+    QuartzExtensionInit();
 }
 
 /*
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 4871ff1..c1900b6 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -284,11 +284,6 @@ InitExtensions(int argc, char *argv[])
         PanoramiXExtensionInit();
 #endif
 
-#ifdef INXQUARTZ
-    if (!noPseudoramiXExtension)
-        PseudoramiXExtensionInit();
-#endif
-
 #ifdef XFIXES
     /* must be before Render to layer DisplayCursor correctly */
     if (!noXFixesExtension)
-- 
1.7.10.4



More information about the xorg-devel mailing list