xserver: Branch 'master' - 6 commits

Keith Packard keithp at kemper.freedesktop.org
Thu May 17 16:51:23 PDT 2012


 hw/xquartz/X11Application.m   |   24 ++++++++++++++++--------
 hw/xquartz/console_redirect.c |   14 ++++++++++++++
 hw/xquartz/quartz.c           |    6 ++++++
 include/globals.h             |    4 ++++
 4 files changed, 40 insertions(+), 8 deletions(-)

New commits:
commit ba883a0f3435d5da82a8134e696c4905eea70f23
Merge: ae1c48e... acdc4f5...
Author: Keith Packard <keithp at keithp.com>
Date:   Thu May 17 16:49:19 2012 -0700

    Merge remote-tracking branch 'jeremyhu/master'

commit acdc4f54ee5784d26c251ff8c941b4360ae80e9b
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Thu May 17 10:08:02 2012 -0700

    XQuartz: Avoid a race in initialization of darwinPointer
    
    http://xquartz.macosforge.org/trac/ticket/579
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 9f4c9b7..1f9b05d 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1329,6 +1329,11 @@ untrusted_str(NSEvent *e)
 }
 #endif
 
+extern void
+darwinEvents_lock(void);
+extern void
+darwinEvents_unlock(void);
+
 - (void) sendX11NSEvent:(NSEvent *)e
 {
     NSPoint location = NSZeroPoint;
@@ -1341,18 +1346,15 @@ untrusted_str(NSEvent *e)
     int modifierFlags;
     BOOL isMouseOrTabletEvent, isTabletEvent;
 
-#ifdef HAVE_LIBDISPATCH
-    static dispatch_once_t once_pred;
-    dispatch_once(&once_pred, ^{
-                      tilt = NSZeroPoint;
-                      darwinTabletCurrent = darwinTabletStylus;
-                  });
-#else
     if (!darwinTabletCurrent) {
+        /* Ensure that the event system is initialized */
+        darwinEvents_lock();
+        darwinEvents_unlock();
+        assert(darwinTabletStylus);
+
         tilt = NSZeroPoint;
         darwinTabletCurrent = darwinTabletStylus;
     }
-#endif
 
     isMouseOrTabletEvent = [e type] == NSLeftMouseDown ||
                            [e type] == NSOtherMouseDown ||
commit c495211373a118acee02a29c6eb25a332abc856c
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Thu May 17 16:20:30 2012 -0700

    XQuartz: Declare noPseudoramiXExtension for miinitext.c
    
    Regression-from: 6699f54fe0b3f4952a75e46fb6c3a643988e65dd
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/include/globals.h b/include/globals.h
index d147df9..8076955 100644
--- a/include/globals.h
+++ b/include/globals.h
@@ -104,6 +104,10 @@ extern _X_EXPORT Bool noXFixesExtension;
 extern _X_EXPORT Bool noPanoramiXExtension;
 #endif
 
+#ifdef INXQUARTZ
+extern _X_EXPORT Bool noPseudoramiXExtension;
+#endif
+
 #ifdef XSELINUX
 extern _X_EXPORT Bool noSELinuxExtension;
 
commit f5fc5334116ad2b0c8930ac68c52bf0f7a2f1417
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon May 7 17:07:27 2012 -0700

    XQuartz: Provide fls implementation for Tiger
    
    Regression-from: 30623d6ff7bca223f9e1a825e86bd317eef8bf16
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/console_redirect.c b/hw/xquartz/console_redirect.c
index 1e0e56b..91d693b 100644
--- a/hw/xquartz/console_redirect.c
+++ b/hw/xquartz/console_redirect.c
@@ -310,6 +310,20 @@ xq_asl_init(void)
     atexit(redirect_atexit);
 }
 
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+#define fls(v) xq_fls(v)
+
+static inline int fls(int value) {
+    unsigned int b, v;
+
+    v = *((unsigned int *)&value);
+
+    for(b=0 ; v ; v >>= 1 , b++);
+
+    return b;
+}
+#endif
+
 int
 xq_asl_log_fd(aslclient asl, aslmsg msg, int level, int fd)
 {
commit e0097ce9719f9b0aeccf7102630c0299f8acdf93
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon May 7 16:31:38 2012 -0700

    XQuartz: Tiger build fix
    
    http://trac.macports.org/ticket/34364
    
    Regression-from: 662d41acdde1dcb9774fbe4054e251c708acaffe
    
    Reported-by: Peter Dyballa <Peter_Dyballa at Freenet.DE>
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 0c3283e..9f4c9b7 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -1641,6 +1641,11 @@ handle_mouse:
 
     case NSScrollWheel:
     {
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
+        float deltaX = [e deltaX];
+        float deltaY = [e deltaY];
+        BOOL isContinuous = NO;
+#else
         CGFloat deltaX = [e deltaX];
         CGFloat deltaY = [e deltaY];
         CGEventRef cge = [e CGEvent];
@@ -1662,6 +1667,7 @@ handle_mouse:
             deltaY *= lineHeight / 5.0;
         }
 #endif
+#endif
         
 #if !defined(XPLUGIN_VERSION) || XPLUGIN_VERSION == 0
         /* If we're in the background, we need to send a MotionNotify event
commit 4acbaa3027d89728ed932616f6ef66d93537b101
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Mon May 7 16:16:20 2012 -0700

    XQuartz: Workaround an SDK bug on Leopard/x86_64
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index ebaa567..62a2852 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -69,6 +69,12 @@
 #include <rootlessCommon.h>
 #include <Xplugin.h>
 
+/* Work around a bug on Leopard's headers */
+#if defined (__LP64__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+extern OSErr UpdateSystemActivity(UInt8 activity);
+#define OverallAct 0
+#endif
+
 DevPrivateKeyRec quartzScreenKeyRec;
 int aquaMenuBarHeight = 0;
 QuartzModeProcsPtr quartzProcs = NULL;


More information about the xorg-commit mailing list