xserver: Branch 'server-1.12-branch' - 4 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed Aug 1 18:16:13 PDT 2012


 dix/devices.c             |    2 ++
 hw/xquartz/pseudoramiX.c  |    4 ++--
 hw/xquartz/pseudoramiX.h  |    2 +-
 hw/xquartz/xpr/xprEvent.c |   32 ++++++++++++++++++++++++++++++++
 test/xtest.c              |    2 --
 5 files changed, 37 insertions(+), 5 deletions(-)

New commits:
commit dfc943609acf73dc3946ba106bcdf6c66997a3b8
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>
    (cherry picked from commit fd228d318428d0d9dea52ca560a9b66660dd2d02)

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 bfcc45861c7a2396c109fdac9b6db84d6b614db1
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Wed Jul 11 23:49:59 2012 -0700

    XQuartz: Fix incorrect PseudoramiXExtensionInit prototype
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    (cherry picked from commit 1a64d3cc9c319d5e9ab2365b60469fb5b83407fc)

diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 01113ce..24349e3 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -125,7 +125,7 @@ PseudoramiXAddScreen(int x, int y, int w, int h)
 // Initialize PseudoramiX.
 // Copied from PanoramiXExtensionInit
 void
-PseudoramiXExtensionInit(int argc, char *argv[])
+PseudoramiXExtensionInit(void)
 {
     Bool success = FALSE;
     ExtensionEntry      *extEntry;
diff --git a/hw/xquartz/pseudoramiX.h b/hw/xquartz/pseudoramiX.h
index f41b5cb..7e08749 100644
--- a/hw/xquartz/pseudoramiX.h
+++ b/hw/xquartz/pseudoramiX.h
@@ -6,6 +6,6 @@ extern int noPseudoramiXExtension;
 
 void
 PseudoramiXAddScreen(int x, int y, int w, int h);
-void PseudoramiXExtensionInit(int argc, char *argv[]);
+void PseudoramiXExtensionInit(void);
 void
 PseudoramiXResetScreens(void);
commit cb8fbccba79b30d0f8443d181016fa78ccce86e6
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Wed Jul 11 23:49:33 2012 -0700

    XQuartz: Silence an unused-variable warning
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    (cherry picked from commit 228f8bfe81890770f1ba109a0acca1c81a2ffee9)

diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c
index 8bb7f2d..01113ce 100644
--- a/hw/xquartz/pseudoramiX.c
+++ b/hw/xquartz/pseudoramiX.c
@@ -256,7 +256,7 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
     REQUEST(xPanoramiXGetScreenSizeReq);
     WindowPtr pWin;
     xPanoramiXGetScreenSizeReply rep;
-    register int n, rc;
+    register int rc;
 
     TRACE();
 
commit 1b2ae1fd7a630c9100ed87bc785fa5d9a52661b0
Author: Daniel Stone <daniel at fooishbar.org>
Date:   Tue Jul 10 09:10:22 2012 +0100

    AllocDevicePair: Ensure XKB privates are initialised
    
    Since we call directly into XKB and may be doing so before the extension
    has been initialised, make sure its privates are set up first.  XTest
    had a hack to do this itself, but seems cleaner to just make sure we do
    it in AllocDevicePair.
    
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit 59c2c4f645b4d782599c274f4bc752de9623d308)

diff --git a/dix/devices.c b/dix/devices.c
index 0125504..fbc9fec 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2630,6 +2630,8 @@ AllocDevicePair(ClientPtr client, const char *name,
 
     *ptr = *keybd = NULL;
 
+    XkbInitPrivates();
+
     pointer = AddInputDevice(client, ptr_proc, TRUE);
 
     if (!pointer)
diff --git a/test/xtest.c b/test/xtest.c
index aeca669..0b8d866 100644
--- a/test/xtest.c
+++ b/test/xtest.c
@@ -63,8 +63,6 @@ xtest_init_devices(void)
     dixResetPrivates();
     InitAtoms();
 
-    XkbInitPrivates();
-
     /* this also inits the xtest devices */
     InitCoreDevices();
 


More information about the xorg-commit mailing list