Commit 80350907 authored by Jeremy Huddleston's avatar Jeremy Huddleston

XQuartz: More Tiger ifdefs

parent a61a8d90
......@@ -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];
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment