[Xquartz-changes] xserver: Branch 'master' - 2 commits

Jeremy Huddleston jeremyhu at freedesktop.org
Thu May 17 16:32:53 PDT 2012


Rebased ref, commits from common ancestor:
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;
 


More information about the Xquartz-changes mailing list