xserver: Branch 'xorg-server-1.4-apple' - 4 commits

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Fri Nov 21 10:58:00 PST 2008


 hw/xquartz/X11Controller.m   |   11 +++++++++--
 hw/xquartz/darwin.c          |    4 ++--
 hw/xquartz/darwin.h          |    4 ++--
 hw/xquartz/pbproxy/pbproxy.h |   11 +++++++++++
 hw/xquartz/quartzAudio.c     |    5 +++++
 hw/xquartz/quartzKeyboard.c  |    8 ++++++--
 hw/xquartz/threadSafety.c    |   12 ++++++++++--
 7 files changed, 45 insertions(+), 10 deletions(-)

New commits:
commit 56c469a68b92c6cf003802f418ea00bd596a41c3
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 21 10:57:31 2008 -0800

    XQuartz: spewCallStack is noop on Tiger now...

diff --git a/hw/xquartz/threadSafety.c b/hw/xquartz/threadSafety.c
index b5a4ecf..85f85bd 100644
--- a/hw/xquartz/threadSafety.c
+++ b/hw/xquartz/threadSafety.c
@@ -31,11 +31,14 @@
 #include "threadSafety.h"
 #include "os.h"
 
-#include <execinfo.h>
-
 pthread_t APPKIT_THREAD_ID;
 pthread_t SERVER_THREAD_ID;
 
+#include <AvailabilityMacros.h>
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+#include <execinfo.h>
+
 void spewCallStack(void) {
     void* callstack[128];
     int i, frames = backtrace(callstack, 128);
@@ -47,6 +50,11 @@ void spewCallStack(void) {
     
     free(strs);
 }
+#else
+void spewCallStack(void) {
+	return;
+}
+#endif
 
 void _threadSafetyAssert(pthread_t tid, const char *file, const char *fun, int line) {
     if(pthread_equal(pthread_self(), tid))
commit 0947aa7911f1de44bfe16e505a757b659c5ab2a8
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 21 10:54:55 2008 -0800

    XQuartz: pbproxy: Added some typedefs for types not available on Tiger

diff --git a/hw/xquartz/pbproxy/pbproxy.h b/hw/xquartz/pbproxy/pbproxy.h
index c8321b3..eb1f3ba 100644
--- a/hw/xquartz/pbproxy/pbproxy.h
+++ b/hw/xquartz/pbproxy/pbproxy.h
@@ -32,6 +32,17 @@
 
 #import  <Foundation/Foundation.h>
 
+#include <AvailabilityMacros.h>
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
+#if __LP64__ || NS_BUILD_32_LIKE_64
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+#endif
+#endif
+
 #define  Cursor X_Cursor
 #undef _SHAPE_H_
 #include <X11/Xlib.h>
commit 803509072f2c039e5cd555c4ac14d672f0e698c5
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 21 10:53:39 2008 -0800

    XQuartz: More Tiger ifdefs

diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index 2668e1e..76fbb57 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -28,6 +28,7 @@
    prior written authorization. */
 
 #include "sanitizedCarbon.h"
+#include <AvailabilityMacros.h>
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
@@ -152,8 +153,11 @@
 
       item = (NSMenuItem *) [menu addItemWithTitle:name action:@selector
 				  (item_selected:) keyEquivalent:shortcut];
-
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
+#else
+      [item setKeyEquivalentModifierMask:windowItemModMask];
+#endif
       [item setTarget:self];
       [item setTag:i];
       [item setEnabled:YES];
@@ -162,8 +166,11 @@
 				       action:@selector
 				       (item_selected:) keyEquivalent:shortcut
 				       atIndex:i];
-
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
       [item setKeyEquivalentModifierMask:(NSUInteger) windowItemModMask];
+#else
+      [item setKeyEquivalentModifierMask:windowItemModMask];
+#endif
       [item setTarget:self];
       [item setTag:i];
       [item setEnabled:YES];
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index e4b804f..914cc36 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -115,10 +115,10 @@ int                     darwinFakeMouse3Mask = NX_COMMANDMASK;
 #endif
 
 // Modifier mask for overriding event delivery to appkit (might be useful to set this to rcommand for input menu
-int                     darwinAppKitModMask = 0; // Any of these bits
+unsigned int            darwinAppKitModMask = 0; // Any of these bits
 
 // Modifier mask for items in the Window menu (0 and -1 cause shortcuts to be disabled)
-int                     windowItemModMask = NX_COMMANDMASK;
+unsigned int            windowItemModMask = NX_COMMANDMASK;
 
 // devices
 DeviceIntPtr            darwinKeyboard = NULL;
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 68b4cf9..5fca6d2 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -82,8 +82,8 @@ extern int              darwinMouseAccelChange;
 extern int              darwinFakeButtons;
 extern int              darwinFakeMouse2Mask;
 extern int              darwinFakeMouse3Mask;
-extern int              darwinAppKitModMask;
-extern int              windowItemModMask;
+extern unsigned int     darwinAppKitModMask;
+extern unsigned int     windowItemModMask;
 extern int              darwinSyncKeymap;
 extern unsigned int     darwinDesiredWidth, darwinDesiredHeight;
 extern int              darwinDesiredDepth;
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 4337f51..7fda011 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -753,6 +753,11 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
     }
 #endif
 
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
+    if(currentKeyLayoutRef)
+        CFRelease(currentKeyLayoutRef);
+#endif
+    
     if (chr_data == NULL) {
       ErrorF ( "Couldn't get uchr or kchr resource\n");
       return FALSE;
@@ -856,7 +861,6 @@ Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
                 k[0] = known_numeric_keys[i].keypad;
         }
     }
-    if(currentKeyLayoutRef)	CFRelease(currentKeyLayoutRef);
-    
+
     return TRUE;
 }
commit a61a8d9047e8765faf3892f4f2148c8553fd192c
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date:   Fri Nov 21 10:44:11 2008 -0800

    XQuartz: Resurrect the old audio path for Tiger

diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c
index ac9f820..2123266 100644
--- a/hw/xquartz/quartzAudio.c
+++ b/hw/xquartz/quartzAudio.c
@@ -47,6 +47,7 @@
 
 #include <CoreAudio/CoreAudio.h>
 #include <pthread.h>
+#include <AvailabilityMacros.h>
 
 #include "inputstr.h"
 #include <X11/extensions/XI.h>
@@ -337,8 +338,12 @@ void QuartzAudioInit(void)
     // fixme assert fadeLength<framesPerBuffer
 
     // Prepare for playback
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
     AudioDeviceIOProcID sInputIOProcID = NULL;
     status = AudioDeviceCreateIOProcID( outputDevice, QuartzAudioIOProc, &data, &sInputIOProcID );
+#else
+    status = AudioDeviceAddIOProc(outputDevice, QuartzAudioIOProc, &data);
+#endif
     if (status) {
         ErrorF("QuartzAudioInit: AddIOProc returned %ld\n", (long)status);
         return;


More information about the xorg-commit mailing list