[PATCH v2 34/42] Quartz: Move PseudoramiX initialisation to DDX

Daniel Stone daniel at fooishbar.org
Fri Dec 2 03:27:42 PST 2011


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>
---

v2: New.

 hw/xquartz/quartz.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index c395b42..46511b5 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -41,6 +41,7 @@
 #include "darwin.h"
 #include "darwinEvents.h"
 #include "pseudoramiX.h"
+#include "extension.h"
 #define _APPLEWM_SERVER_
 #include "applewmExt.h"
 
@@ -137,6 +138,22 @@ Bool QuartzSetupScreen(
     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
@@ -178,6 +195,8 @@ void QuartzInitOutput(
 
     // Do display mode specific initialization
     quartzProcs->DisplayInit();
+
+    QuartzExtensionInit();
 }
 
 
-- 
1.7.7.3



More information about the xorg-devel mailing list