aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-12 19:11:20 +0000
committermarha <marha@users.sourceforge.net>2009-10-12 19:11:20 +0000
commit0c5e1ab504b4e8c56974a234bd440e9fa2f1f941 (patch)
treedb87caaf48c192096c00798d3f18cf458605f4a0 /xorg-server/hw/xquartz
parente4bc1b2bff00254f5782928d5b7b15b4db2e774c (diff)
downloadvcxsrv-0c5e1ab504b4e8c56974a234bd440e9fa2f1f941.tar.gz
vcxsrv-0c5e1ab504b4e8c56974a234bd440e9fa2f1f941.tar.bz2
vcxsrv-0c5e1ab504b4e8c56974a234bd440e9fa2f1f941.zip
Updated to:
font-util-1.1.1 xorg-server-1.7.0.901
Diffstat (limited to 'xorg-server/hw/xquartz')
-rw-r--r--xorg-server/hw/xquartz/GL/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/X11Application.m2
-rw-r--r--xorg-server/hw/xquartz/bundle/Info.plist.cpp4
-rw-r--r--xorg-server/hw/xquartz/bundle/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/doc/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/mach-startup/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/mach-startup/bundle-main.c77
-rw-r--r--xorg-server/hw/xquartz/mach-startup/stub.c2
-rw-r--r--xorg-server/hw/xquartz/pbproxy/Makefile.in3
-rw-r--r--xorg-server/hw/xquartz/quartzKeyboard.c147
-rw-r--r--xorg-server/hw/xquartz/quartzPasteboard.c147
-rw-r--r--xorg-server/hw/xquartz/quartzPasteboard.h44
-rw-r--r--xorg-server/hw/xquartz/xpr/Makefile.in3
14 files changed, 149 insertions, 295 deletions
diff --git a/xorg-server/hw/xquartz/GL/Makefile.in b/xorg-server/hw/xquartz/GL/Makefile.in
index 56e7c53ba..6b6127403 100644
--- a/xorg-server/hw/xquartz/GL/Makefile.in
+++ b/xorg-server/hw/xquartz/GL/Makefile.in
@@ -134,6 +134,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -226,6 +227,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -342,7 +344,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/Makefile.in b/xorg-server/hw/xquartz/Makefile.in
index a5f6a17a1..9864293f7 100644
--- a/xorg-server/hw/xquartz/Makefile.in
+++ b/xorg-server/hw/xquartz/Makefile.in
@@ -187,6 +187,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -279,6 +280,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -395,7 +397,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m
index 749a8932b..f4fbb1abe 100644
--- a/xorg-server/hw/xquartz/X11Application.m
+++ b/xorg-server/hw/xquartz/X11Application.m
@@ -986,7 +986,7 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
isMouseOrTabletEvent = [e type] == NSLeftMouseDown || [e type] == NSOtherMouseDown || [e type] == NSRightMouseDown ||
[e type] == NSLeftMouseUp || [e type] == NSOtherMouseUp || [e type] == NSRightMouseUp ||
[e type] == NSLeftMouseDragged || [e type] == NSOtherMouseDragged || [e type] == NSRightMouseDragged ||
- [e type] == NSMouseMoved || [e type] == NSTabletPoint;
+ [e type] == NSMouseMoved || [e type] == NSTabletPoint || [e type] == NSScrollWheel;
isTabletEvent = ([e type] == NSTabletPoint) ||
(isMouseOrTabletEvent && ([e subtype] == NSTabletPointEventSubtype || [e subtype] == NSTabletProximityEventSubtype));
diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
index d385e078b..87214f456 100644
--- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp
+++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.4.0</string>
+ <string>2.5.0</string>
<key>CFBundleVersion</key>
- <string>2.4.0</string>
+ <string>2.5.0</string>
<key>CFBundleSignature</key>
<string>x11a</string>
<key>CSResourcesFileMapped</key>
diff --git a/xorg-server/hw/xquartz/bundle/Makefile.in b/xorg-server/hw/xquartz/bundle/Makefile.in
index 8a56b79e8..fccfb7357 100644
--- a/xorg-server/hw/xquartz/bundle/Makefile.in
+++ b/xorg-server/hw/xquartz/bundle/Makefile.in
@@ -140,6 +140,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -232,6 +233,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -348,7 +350,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/doc/Makefile.in b/xorg-server/hw/xquartz/doc/Makefile.in
index 8b5ad69a5..1c2540fbc 100644
--- a/xorg-server/hw/xquartz/doc/Makefile.in
+++ b/xorg-server/hw/xquartz/doc/Makefile.in
@@ -136,6 +136,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -228,6 +229,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -344,7 +346,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/mach-startup/Makefile.in b/xorg-server/hw/xquartz/mach-startup/Makefile.in
index 42fd1cf92..47d174c19 100644
--- a/xorg-server/hw/xquartz/mach-startup/Makefile.in
+++ b/xorg-server/hw/xquartz/mach-startup/Makefile.in
@@ -171,6 +171,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -263,6 +264,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -379,7 +381,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/mach-startup/bundle-main.c b/xorg-server/hw/xquartz/mach-startup/bundle-main.c
index 917bbafbe..146ea11d8 100644
--- a/xorg-server/hw/xquartz/mach-startup/bundle-main.c
+++ b/xorg-server/hw/xquartz/mach-startup/bundle-main.c
@@ -80,7 +80,8 @@ const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION " Bui
char __crashreporter_info__buf[4096];
char *__crashreporter_info__ = __crashreporter_info__buf;
-static char *server_bootstrap_name = LAUNCHD_ID_PREFIX".X11";
+static char *launchd_id_prefix = NULL;
+static char *server_bootstrap_name = NULL;
#define DEBUG 1
@@ -456,6 +457,7 @@ static void setup_env(void) {
char *temp;
const char *pds = NULL;
const char *disp = getenv("DISPLAY");
+ size_t len;
/* Pass on our prefs domain to startx and its inheritors (mainly for
* quartz-wm and the Xquartz stub's MachIPC)
@@ -465,45 +467,56 @@ static void setup_env(void) {
CFStringRef pd = CFBundleGetIdentifier(bundle);
if(pd) {
pds = CFStringGetCStringPtr(pd, 0);
- if(pds) {
- server_bootstrap_name = malloc(sizeof(char) * (strlen(pds) + 1));
- strcpy(server_bootstrap_name, pds);
- setenv("X11_PREFS_DOMAIN", pds, 1);
- }
}
}
+
+ /* fallback to hardcoded value if we can't discover it */
+ if(!pds) {
+ pds = LAUNCHD_ID_PREFIX".X11";
+ }
+
+ server_bootstrap_name = malloc(sizeof(char) * (strlen(pds) + 1));
+ if(!server_bootstrap_name) {
+ fprintf(stderr, "Memory allocation error.\n");
+ exit(1);
+ }
+ strcpy(server_bootstrap_name, pds);
+ setenv("X11_PREFS_DOMAIN", server_bootstrap_name, 1);
+
+ len = strlen(server_bootstrap_name);
+ launchd_id_prefix = malloc(sizeof(char) * (len - 3));
+ if(!launchd_id_prefix) {
+ fprintf(stderr, "Memory allocation error.\n");
+ exit(1);
+ }
+ strlcpy(launchd_id_prefix, server_bootstrap_name, len - 3);
+
/* We need to unset DISPLAY if it is not our socket */
if(disp) {
- if(!pds) {
- /* If we can't detet our id, we are beyond hope and need to just
- * revert to the non-launchd startup */
- unsetenv("DISPLAY");
- } else {
- /* s = basename(disp) */
- const char *d, *s;
+ /* s = basename(disp) */
+ const char *d, *s;
for(s = NULL, d = disp; *d; d++) {
- if(*d == '/')
- s = d + 1;
- }
-
- if(s && *s) {
- size_t pds_len = strlen(pds);
- temp = (char *)malloc(sizeof(char) * pds_len);
- if(!temp) {
- fprintf(stderr, "Memory allocation error creating space for socket name test.\n");
- }
- strlcpy(temp, pds, pds_len - 3);
- strlcat(temp, ":0", pds_len);
+ if(*d == '/')
+ s = d + 1;
+ }
- if(strcmp(temp, s) != 0) {
- /* If we don't have a match, unset it. */
- unsetenv("DISPLAY");
- }
- free(temp);
- } else {
- /* The DISPLAY environment variable is not formatted like a launchd socket, so reset. */
+ if(s && *s) {
+ temp = (char *)malloc(sizeof(char) * len);
+ if(!temp) {
+ fprintf(stderr, "Memory allocation error creating space for socket name test.\n");
+ exit(1);
+ }
+ strlcpy(temp, launchd_id_prefix, len);
+ strlcat(temp, ":0", len);
+
+ if(strcmp(temp, s) != 0) {
+ /* If we don't have a match, unset it. */
unsetenv("DISPLAY");
}
+ free(temp);
+ } else {
+ /* The DISPLAY environment variable is not formatted like a launchd socket, so reset. */
+ unsetenv("DISPLAY");
}
}
diff --git a/xorg-server/hw/xquartz/mach-startup/stub.c b/xorg-server/hw/xquartz/mach-startup/stub.c
index 3d22db5d1..8f670353a 100644
--- a/xorg-server/hw/xquartz/mach-startup/stub.c
+++ b/xorg-server/hw/xquartz/mach-startup/stub.c
@@ -205,7 +205,7 @@ int main(int argc, char **argv, char **envp) {
sig_t handler;
if(argc == 2 && !strcmp(argv[1], "-version")) {
- fprintf(stderr, "X.org Release 7.4\n");
+ fprintf(stderr, "X.org Release 7.5\n");
fprintf(stderr, "X.Org X Server %s\n", XSERVER_VERSION);
fprintf(stderr, "Build Date: %s\n", BUILD_DATE);
return EXIT_SUCCESS;
diff --git a/xorg-server/hw/xquartz/pbproxy/Makefile.in b/xorg-server/hw/xquartz/pbproxy/Makefile.in
index ec2d81c36..5243f4934 100644
--- a/xorg-server/hw/xquartz/pbproxy/Makefile.in
+++ b/xorg-server/hw/xquartz/pbproxy/Makefile.in
@@ -158,6 +158,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -250,6 +251,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -366,7 +368,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@
diff --git a/xorg-server/hw/xquartz/quartzKeyboard.c b/xorg-server/hw/xquartz/quartzKeyboard.c
index d36d967a2..06b981e02 100644
--- a/xorg-server/hw/xquartz/quartzKeyboard.c
+++ b/xorg-server/hw/xquartz/quartzKeyboard.c
@@ -280,98 +280,123 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
}
/*
- * DarwinLoadKeyboardMapping
- * Load the keyboard map from a file or system and convert
- * it to an equivalent X keyboard map and modifier map.
- */
-static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) {
- DarwinBuildModifierMaps(&keyInfo);
-
- keySyms->map = keyInfo.keyMap;
- keySyms->mapWidth = GLYPHS_PER_KEY;
- keySyms->minKeyCode = MIN_KEYCODE;
- keySyms->maxKeyCode = MAX_KEYCODE;
-}
-
-/*
- * DarwinKeyboardSetDeviceKeyMap
- * Load a keymap into the keyboard device
- */
-static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms, CARD8 *modmap) {
- DeviceIntPtr pDev;
-
- for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
- if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key)
- XkbApplyMappingChange(pDev, keySyms, keySyms->minKeyCode,
- keySyms->maxKeyCode - keySyms->minKeyCode + 1,
- modmap, serverClient);
-}
-
-/*
* DarwinKeyboardInit
* Get the Darwin keyboard map and compute an equivalent
* X keyboard map and modifier map. Set the new keyboard
* device structure.
*/
void DarwinKeyboardInit(DeviceIntPtr pDev) {
- KeySymsRec keySyms;
- XkbComponentNamesRec names;
- CFIndex value;
- BOOL ok;
-
// Open a shared connection to the HID System.
// Note that the Event Status Driver is really just a wrapper
// for a kIOHIDParamConnectType connection.
assert(darwinParamConnect = NXOpenEventStatus());
- bzero(&names, sizeof(names));
-
/* We need to really have rules... or something... */
//XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl);
- pthread_mutex_lock(&keyInfo_mutex);
- DarwinLoadKeyboardMapping(&keySyms);
- DarwinKeyboardSetDeviceKeyMap(&keySyms, keyInfo.modMap);
- pthread_mutex_unlock(&keyInfo_mutex);
+ DarwinKeyboardReloadHandler();
- /* Get our key repeat settings from GlobalPreferences */
- (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
- value = CFPreferencesGetAppIntegerValue(CFSTR("InitialKeyRepeat"), CFSTR(".GlobalPreferences"), &ok);
- if(!ok)
- value = 35;
+ CopyKeyClass(pDev, inputInfo.keyboard);
+}
- if(value == 300000) { // off
+/* Set the repeat rates based on global preferences and keycodes for modifiers.
+ * Precondition: Has the keyInfo_mutex lock.
+ */
+static void DarwinKeyboardSetRepeat(DeviceIntPtr pDev, int initialKeyRepeatValue, int keyRepeatValue) {
+ if(initialKeyRepeatValue == 300000) { // off
+ /* Turn off repeats globally */
XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOff);
} else {
- pDev->key->xkbInfo->desc->ctrls->repeat_delay = value * 15;
-
- value = CFPreferencesGetAppIntegerValue(CFSTR("KeyRepeat"), CFSTR(".GlobalPreferences"), &ok);
- if(!ok)
- value = 6;
- pDev->key->xkbInfo->desc->ctrls->repeat_interval = value * 15;
+ int i;
+ XkbControlsPtr ctrl;
+ XkbControlsRec old;
+ /* Turn on repeats globally */
XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOn);
- }
+
+ /* Setup the bit mask for individual key repeats */
+ ctrl = pDev->key->xkbInfo->desc->ctrls;
+ old= *ctrl;
+
+ ctrl->repeat_delay = initialKeyRepeatValue * 15;
+ ctrl->repeat_interval = keyRepeatValue * 15;
+
+ /* Turn off key-repeat for modifier keys, on for others */
+ /* First set them all on */
+ for(i=0; i < XkbPerKeyBitArraySize; i++)
+ ctrl->per_key_repeat[i] = -1;
+
+ /* Now turn off the modifiers */
+ for(i=0; i < 32; i++) {
+ unsigned char keycode;
+
+ keycode = keyInfo.modifierKeycodes[i][0];
+ if(keycode)
+ ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE);
+
+ keycode = keyInfo.modifierKeycodes[i][1];
+ if(keycode)
+ ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE);
+ }
- CopyKeyClass(pDev, inputInfo.keyboard);
+ /* Hurray for data duplication */
+ if (pDev->kbdfeed)
+ memcpy(pDev->kbdfeed->ctrl.autoRepeats, ctrl->per_key_repeat, XkbPerKeyBitArraySize);
+
+ //fprintf(stderr, "per_key_repeat =\n");
+ //for(i=0; i < XkbPerKeyBitArraySize; i++)
+ // fprintf(stderr, "%02x%s", ctrl->per_key_repeat[i], (i + 1) & 7 ? "" : "\n");
+
+ /* And now we notify the puppies about the changes */
+ XkbDDXChangeControls(pDev, &old, ctrl);
+ }
}
void DarwinKeyboardReloadHandler(void) {
KeySymsRec keySyms;
+ CFIndex initialKeyRepeatValue, keyRepeatValue;
+ BOOL ok;
+ DeviceIntPtr pDev = darwinKeyboard;
DEBUG_LOG("DarwinKeyboardReloadHandler\n");
-// if (pDev->key) {
-// if (pDev->key->curKeySyms.map) xfree(pDev->key->curKeySyms.map);
-// xfree(pDev->key);
-// }
+ /* Get our key repeat settings from GlobalPreferences */
+ (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences"));
- pthread_mutex_lock(&keyInfo_mutex);
- DarwinLoadKeyboardMapping(&keySyms);
- DarwinKeyboardSetDeviceKeyMap(&keySyms, keyInfo.modMap);
- pthread_mutex_unlock(&keyInfo_mutex);
+ initialKeyRepeatValue = CFPreferencesGetAppIntegerValue(CFSTR("InitialKeyRepeat"), CFSTR(".GlobalPreferences"), &ok);
+ if(!ok)
+ initialKeyRepeatValue = 35;
+
+ keyRepeatValue = CFPreferencesGetAppIntegerValue(CFSTR("KeyRepeat"), CFSTR(".GlobalPreferences"), &ok);
+ if(!ok)
+ keyRepeatValue = 6;
+
+ pthread_mutex_lock(&keyInfo_mutex); {
+ /* Initialize our keySyms */
+ DarwinBuildModifierMaps(&keyInfo);
+ keySyms.map = keyInfo.keyMap;
+ keySyms.mapWidth = GLYPHS_PER_KEY;
+ keySyms.minKeyCode = MIN_KEYCODE;
+ keySyms.maxKeyCode = MAX_KEYCODE;
+
+ /* Apply the mappings to darwinKeyboard */
+ XkbApplyMappingChange(darwinKeyboard, &keySyms, keySyms.minKeyCode,
+ keySyms.maxKeyCode - keySyms.minKeyCode + 1,
+ keyInfo.modMap, serverClient);
+ DarwinKeyboardSetRepeat(darwinKeyboard, initialKeyRepeatValue, keyRepeatValue);
+
+ /* Apply the mappings to the core keyboard */
+ for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
+ if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) {
+ XkbApplyMappingChange(pDev, &keySyms, keySyms.minKeyCode,
+ keySyms.maxKeyCode - keySyms.minKeyCode + 1,
+ keyInfo.modMap, serverClient);
+ DarwinKeyboardSetRepeat(pDev, initialKeyRepeatValue, keyRepeatValue);
+ }
+ }
+ } pthread_mutex_unlock(&keyInfo_mutex);
}
//-----------------------------------------------------------------------------
diff --git a/xorg-server/hw/xquartz/quartzPasteboard.c b/xorg-server/hw/xquartz/quartzPasteboard.c
deleted file mode 100644
index 60bcabe4c..000000000
--- a/xorg-server/hw/xquartz/quartzPasteboard.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/**************************************************************
- * quartzPasteboard.c
- *
- * Aqua pasteboard <-> X cut buffer
- * Greg Parker gparker@cs.stanford.edu March 8, 2001
- **************************************************************/
-/*
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifdef HAVE_DIX_CONFIG_H
-#include <dix-config.h>
-#endif
-
-#include "misc.h"
-#include "inputstr.h"
-#include "quartzPasteboard.h"
-
-#include <X11/Xatom.h>
-#include "windowstr.h"
-#include "propertyst.h"
-#include "scrnintstr.h"
-#include "selection.h"
-#include "globals.h"
-
-
-// Helper function to read the X11 cut buffer
-// FIXME: What about multiple screens? Currently, this reads the first
-// CUT_BUFFER0 from the first screen where the buffer content is a string.
-// Returns a string on the heap that the caller must free.
-// Returns NULL if there is no cut text or there is not enough memory.
-static char * QuartzReadCutBuffer(void)
-{
- int rc, i;
- char *text = NULL;
-
- for (i = 0; i < screenInfo.numScreens; i++) {
- ScreenPtr pScreen = screenInfo.screens[i];
- PropertyPtr pProp;
-
- rc = dixLookupProperty(&pProp, WindowTable[pScreen->myNum],
- XA_CUT_BUFFER0, serverClient, DixReadAccess);
- if (rc != Success) continue;
- if (pProp->type != XA_STRING) continue;
- if (pProp->format != 8) continue;
-
- text = xalloc(1 + pProp->size);
- if (! text) continue;
- memcpy(text, pProp->data, pProp->size);
- text[pProp->size] = '\0';
- return text;
- }
-
- // didn't find any text
- return NULL;
-}
-
-// Write X cut buffer to Mac OS X pasteboard
-// Called by mieqProcessInputEvents() in response to request from X server thread.
-void QuartzWritePasteboard(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents)
-{
- char *text;
- text = QuartzReadCutBuffer();
- if (text) {
- QuartzWriteCocoaPasteboard(text);
- free(text);
- }
-}
-
-#define strequal(a, b) (0 == strcmp((a), (b)))
-
-// Read Mac OS X pasteboard into X cut buffer
-// Called by mieqProcessInputEvents() in response to request from X server thread.
-void QuartzReadPasteboard(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents)
-{
- char *oldText = QuartzReadCutBuffer();
- char *text = QuartzReadCocoaPasteboard();
-
- // Compare text with current cut buffer contents.
- // Change the buffer if both exist and are different
- // OR if there is new text but no old text.
- // Otherwise, don't clear the selection unnecessarily.
-
- if ((text && oldText && !strequal(text, oldText)) ||
- (text && !oldText)) {
- int scrn, rc;
- Selection *pSel;
-
- for (scrn = 0; scrn < screenInfo.numScreens; scrn++) {
- ScreenPtr pScreen = screenInfo.screens[scrn];
- // Set the cut buffers on each screen
- // fixme really on each screen?
- dixChangeWindowProperty(serverClient, WindowTable[pScreen->myNum],
- XA_CUT_BUFFER0, XA_STRING, 8, PropModeReplace,
- strlen(text), (pointer)text, TRUE);
- }
-
- // Undo any current X selection (similar to code in dispatch.c)
- // FIXME: what about secondary selection?
- // FIXME: only touch first XA_PRIMARY selection?
- rc = dixLookupSelection(&pSel, XA_PRIMARY, serverClient,
- DixSetAttrAccess);
- if (rc == Success) {
- // Notify client if necessary
- if (pSel->client) {
- xEvent event;
-
- event.u.u.type = SelectionClear;
- event.u.selectionClear.time = GetTimeInMillis();
- event.u.selectionClear.window = pSel->window;
- event.u.selectionClear.atom = pSel->selection;
- TryClientEvents(pSel->client, dev, &event, 1, NoEventMask,
- NoEventMask /*CantBeFiltered*/, NullGrab);
- }
-
- // Erase it
- pSel->pWin = NullWindow;
- pSel->window = None;
- pSel->client = NullClient;
- }
- }
-
- if (text) free(text);
- if (oldText) free(oldText);
-}
diff --git a/xorg-server/hw/xquartz/quartzPasteboard.h b/xorg-server/hw/xquartz/quartzPasteboard.h
deleted file mode 100644
index b51cd88e0..000000000
--- a/xorg-server/hw/xquartz/quartzPasteboard.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- QuartzPasteboard.h
-
- Mac OS X pasteboard <-> X cut buffer
- Greg Parker gparker@cs.stanford.edu March 8, 2001
-*/
-/*
- * Copyright (c) 2001 Greg Parker. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- * Except as contained in this notice, the name(s) of the above copyright
- * holders shall not be used in advertising or otherwise to promote the sale,
- * use or other dealings in this Software without prior written authorization.
- */
-
-#ifndef _QUARTZPASTEBOARD_H
-#define _QUARTZPASTEBOARD_H
-
-// Aqua->X
-void QuartzReadPasteboard(int, xEventPtr, DeviceIntPtr, int);
-char * QuartzReadCocoaPasteboard(void); // caller must free string
-
-// X->Aqua
-void QuartzWritePasteboard(int, xEventPtr, DeviceIntPtr, int);
-void QuartzWriteCocoaPasteboard(char *text);
-
-#endif /* _QUARTZPASTEBOARD_H */
diff --git a/xorg-server/hw/xquartz/xpr/Makefile.in b/xorg-server/hw/xquartz/xpr/Makefile.in
index 2eef19d62..f0054fb37 100644
--- a/xorg-server/hw/xquartz/xpr/Makefile.in
+++ b/xorg-server/hw/xquartz/xpr/Makefile.in
@@ -135,6 +135,7 @@ DEPDIR = @DEPDIR@
DGA_CFLAGS = @DGA_CFLAGS@
DGA_LIBS = @DGA_LIBS@
DIX_CFLAGS = @DIX_CFLAGS@
+DIX_LIB = @DIX_LIB@
DLLTOOL = @DLLTOOL@
DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@
DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@
@@ -227,6 +228,7 @@ OBJCFLAGS = @OBJCFLAGS@
OBJCLINK = @OBJCLINK@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OS_LIB = @OS_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -343,7 +345,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
-distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
driverdir = @driverdir@
dvidir = @dvidir@