xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Wed Jul 25 13:53:25 PDT 2012


 hw/xquartz/GL/indirect.c  |   10 +++++++++-
 hw/xquartz/quartz.c       |   12 +++++++++---
 hw/xquartz/xpr/xprEvent.c |   32 ++++++++++++++++++++++++++++++++
 mi/miinitext.c            |    6 ++++++
 4 files changed, 56 insertions(+), 4 deletions(-)

New commits:
commit 20b4d90f32b3ca5def5be2fdf04a91ae6c47f125
Merge: 83df169... fd228d3...
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Jul 25 13:52:35 2012 -0700

    Merge remote-tracking branch 'jeremyhu/master'

commit fd228d318428d0d9dea52ca560a9b66660dd2d02
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Wed Jul 25 11:40:33 2012 -0700

    XQuartz: Call xp_window_bring_all_to_front if available in libXplugin
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/xpr/xprEvent.c b/hw/xquartz/xpr/xprEvent.c
index 106a919..73bcc93 100644
--- a/hw/xquartz/xpr/xprEvent.c
+++ b/hw/xquartz/xpr/xprEvent.c
@@ -52,9 +52,20 @@
 #include <sys/uio.h>
 #include <unistd.h>
 
+#ifdef HAVE_LIBDISPATCH
+#include <dispatch/dispatch.h>
+#endif
+
 #include "rootlessWindow.h"
 #include "xprEvent.h"
 
+/* This is important enough to declare here if building against an old
+ * libXplugin, so we pick it up whenever libXplugin  starts to support it.
+ */
+#if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION < 6
+extern xp_error xp_window_bring_all_to_front(void) __attribute__((weak_import));
+#endif
+
 Bool
 QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
 {
@@ -72,7 +83,28 @@ QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev)
 
     case kXquartzBringAllToFront:
         DEBUG_LOG("kXquartzBringAllToFront\n");
+        /* There's no need to do xp_window_bring_all_to_front on Leopard,
+         * and we don't care about the result, so just do it async.
+         */
+#if defined(HAVE_LIBDISPATCH)
+#if (defined(XPLUGIN_VERSION_MIN_REQUIRED) && XPLUGIN_VERSION_MIN_REQUIRED >= 6) || \
+    (!defined(XPLUGIN_VERSION_MIN_REQUIRED) && defined(XPLUGIN_VERSION) && XPLUGIN_VERSION >= 6)
+        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+            xp_window_bring_all_to_front();
+        });
+#else
+            if (&xp_window_bring_all_to_front) {
+                dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                    xp_window_bring_all_to_front();
+                });
+            } else {
+                RootlessOrderAllWindows(e->data[0]);
+            }
+#endif
+#else
         RootlessOrderAllWindows(e->data[0]);
+#endif
+
         return TRUE;
 
     default:
commit 3b7f313b3d74f9df876152c55d55cbb339bf2d02
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Jul 24 00:32:30 2012 -0700

    XQuartz: Fix runtime regressions introduced by extension loading changes
    
     * GLX is now loaded
     * PseudoramiX loading is back in miinitext.  It needs to be loaded
       before RandR.
    
    Regression-from: 27a624bee66d2797eacf90317054207dcf248028
    Regression-from: 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 3de223b..d74fc64 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -144,15 +144,21 @@ QuartzSetupScreen(int index,
     return TRUE;
 }
 
-static const ExtensionModule quartzExtensions[] = {
-    { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension, NULL },
+static ExtensionModule quartzExtensions[] = {
+    /* PseudoramiX needs to be done before RandR, so
+     * it is in miinitext.c until it can be reordered.
+     * { PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension },
+     */
+#ifdef GLXEXT
+    {GlxExtensionInit, "GLX", &noGlxExtension},
+#endif
 };
 
 /*
  * QuartzExtensionInit
  * Initialises XQuartz-specific extensions.
  */
-void QuartzExtensionInit(void)
+static void QuartzExtensionInit(void)
 {
     int i;
 
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 86fc31c..d175440 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -254,6 +254,12 @@ static ExtensionModule staticExtensions[] = {
 #ifdef PANORAMIX
     {PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension},
 #endif
+#ifdef INXQUARTZ
+    /* PseudoramiXExtensionInit must be done before RRExtensionInit, or
+     * XQuartz will render windows offscreen.
+     */
+    {PseudoramiXExtensionInit, "PseudoramiX", &noPseudoramiXExtension},
+#endif
 #ifdef XFIXES
     /* must be before Render to layer DisplayCursor correctly */
     {XFixesExtensionInit, "XFIXES", &noXFixesExtension},
commit 0d64e881a31d89d28f2ded9b8e83e93632870a16
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon Jul 23 23:16:29 2012 -0700

    XQuartz: Build fix for __GLXscreen::createContext changes
    
    Regression-from: 96d74138b1c0273e88933220d99a893858b649cd
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index d9dc2a1..c4999b5 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -135,12 +135,20 @@ struct __GLXAquaDrawable {
 static __GLXcontext *
 __glXAquaScreenCreateContext(__GLXscreen *screen,
                              __GLXconfig *conf,
-                             __GLXcontext *baseShareContext)
+                             __GLXcontext *baseShareContext,
+                             unsigned num_attribs,
+                             const uint32_t *attribs,
+                             int *error)
 {
     __GLXAquaContext *context;
     __GLXAquaContext *shareContext = (__GLXAquaContext *)baseShareContext;
     CGLError gl_err;
 
+    /* Unused (for now?) */
+    (void)num_attribs;
+    (void)attribs;
+    (void)error;
+
     GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n");
 
     context = calloc(1, sizeof(__GLXAquaContext));


More information about the xorg-commit mailing list