Merge branch 'xorg-server-1.2-apple' of ssh://git.freedesktop.org/git/xorg/xserver into xorg-server-1.2-apple

This commit is contained in:
Ben Byer 2007-11-30 11:20:47 -08:00
commit 7e8515715f
35 changed files with 102 additions and 199 deletions

View file

@ -1,7 +1,6 @@
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-DBUILD_DATE=\"$(BUILD_DATE)\" \
-DHAVE_XORG_CONFIG_H \
-DINXQUARTZ \
-DUSE_NEW_CLUT \
-DXFree86Server \

View file

@ -29,7 +29,9 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h>
#include <X11/Xproto.h>

View file

@ -27,9 +27,6 @@
#ifndef _DARWIN_H
#define _DARWIN_H
//#include "dix-config.h" // This crashes us for some reason...
#define SHAPE
#include <IOKit/IOTypes.h>
#include "inputstr.h"
#include "scrnintstr.h"

View file

@ -30,6 +30,10 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xmd.h>

View file

@ -56,9 +56,13 @@
===========================================================================
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
// Define this to get a diagnostic output to stderr which is helpful
// in determining how the X server is interpreting the Darwin keymap.
#define DUMP_DARWIN_KEYMAP
// #define DUMP_DARWIN_KEYMAP
#include <stdio.h>
#include <stdlib.h>
@ -69,7 +73,15 @@
#include <architecture/byte_order.h> // For the NXSwap*
#include "darwin.h"
#include "darwinKeyboard.h"
#ifdef NDEBUG
#undef NDEBUG
#include <assert.h>
#define NDEBUG 1
#else
#include <assert.h>
#endif
#define AltMask Mod1Mask
#define MetaMask Mod2Mask
#define FunctionMask Mod3Mask
@ -212,9 +224,6 @@ static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl )
}
darwinKeyboardInfo keyInfo;
KeySymRemapList *keySymRemapList = NULL;
ModMaskRemapList *modMaskRemapList = NULL;
static FILE *fref = NULL;
static char *inBuffer = NULL;
@ -461,8 +470,6 @@ Bool DarwinParseNXKeyMapping(
}
}
DEBUG_LOG("DarwinParseNXKeyMapping: Parsing keymap file: %s.\n", darwinKeymapFile);
if (!haveKeymap) {
// get the Darwin keyboard map
keyMap.size = NXKeyMappingLength( darwinParamConnect );
@ -637,108 +644,6 @@ Bool DarwinParseNXKeyMapping(
return TRUE;
}
/* Return the modifier mask for the given string. If no match, return -1 */
static CARD8 strToXModMask(const char *str) {
if(!strcmp(str, "shift")) {
return ShiftMask;
} else if(!strcmp(str, "lock")) {
return LockMask;
} else if(!strcmp(str, "control")) {
return ControlMask;
} else if(!strcmp(str, "mod1")) {
return Mod1Mask;
} else if(!strcmp(str, "mod2")) {
return Mod2Mask;
} else if(!strcmp(str, "mod3")) {
return Mod3Mask;
} else if(!strcmp(str, "mod4")) {
return Mod4Mask;
} else if(!strcmp(str, "mod5")) {
return Mod5Mask;
}
DEBUG_LOG("Invalid str: %s\n", str);
return -1;
}
/* Return the KeySym for the given string. If no match, return -1 */
static KeySym strToXKeySym(const char *str) {
if(!strcmp(str, "Shift_L")) {
return XK_Shift_L;
} else if(!strcmp(str, "Shift_R")) {
return XK_Shift_R;
} else if(!strcmp(str, "Caps_Lock")) {
return XK_Caps_Lock;
} else if(!strcmp(str, "Control_L")) {
return XK_Control_L;
} else if(!strcmp(str, "Control_R")) {
return XK_Control_R;
} else if(!strcmp(str, "Alt_L")) {
return XK_Alt_L;
} else if(!strcmp(str, "Alt_R")) {
return XK_Alt_R;
} else if(!strcmp(str, "Meta_L")) {
return XK_Meta_L;
} else if(!strcmp(str, "Meta_R")) {
return XK_Meta_R;
} else if(!strcmp(str, "Mode_switch")) {
return XK_Mode_switch;
} else if(!strcmp(str, "Multi_key")) {
return XK_Multi_key;
}
DEBUG_LOG("Invalid str: %s\n", str);
return -1;
}
Bool DarwinKeyboardModMaskRemapStr(const char *keyS, const char *mask) {
KeySym key;
KeySym modMask;
ModMaskRemapList *m;
key = strToXKeySym(keyS);
modMask = strToXModMask(mask);
if(key == -1 || modMask == -1)
return 0;
m = (ModMaskRemapList *)xalloc(sizeof(ModMaskRemapList));
if(!m) {
DEBUG_LOG("Error allocating memory.\n");
return 0;
}
m->key = key;
m->modMask = modMask;
m->next = modMaskRemapList;
modMaskRemapList = m;
return 1;
}
Bool DarwinKeyboardKeySymRemapStr(const char *fromS, const char *toS) {
KeySym from;
KeySym to;
KeySymRemapList *m;
from = strToXKeySym(fromS);
to = strToXKeySym(toS);
if(from == -1 || to == -1)
return 0;
m = (KeySymRemapList *)xalloc(sizeof(KeySymRemapList));
if(!m) {
DEBUG_LOG("Error allocating memory.\n");
return 0;
}
m->from = from;
m->to = to;
m->next = keySymRemapList;
keySymRemapList = m;
return 1;
}
/*
* DarwinBuildModifierMaps
* Use the keyMap field of keyboard info structure to populate
@ -825,12 +730,6 @@ DarwinBuildModifierMaps(darwinKeyboardInfo *info) {
info->modMap[MIN_KEYCODE + i] = Mod3Mask;
break;
}
/* Use modMaskRemapList to overwrite default ModMasks */
ModMaskRemapList *m;
for(m = modMaskRemapList; m; m = m->next)
if(*k == m->key)
info->modMap[MIN_KEYCODE + i] = m->modMask;
}
}
@ -858,19 +757,6 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms)
}
}
/* Use keySymRemapList to overwrite default key mappings.
* We do this because IOKit doesn't know about Mode_shift, etc and we
* want to allow the user to set thisa key to this. We could use
* custom keymap files, but this is easier for the user to work with.
*/
for (i = 0; i < NUM_KEYCODES; i++) {
k = keyInfo.keyMap + i * GLYPHS_PER_KEY;
KeySymRemapList *m;
for(m = keySymRemapList; m; m = m->next)
if(*k == m->from)
*k = m->to;
}
DarwinBuildModifierMaps(&keyInfo);
#ifdef DUMP_DARWIN_KEYMAP

View file

@ -44,24 +44,6 @@ typedef struct darwinKeyboardInfo_struct {
unsigned char modifierKeycodes[32][2];
} darwinKeyboardInfo;
typedef struct KeySymRemapList_struct {
KeySym from;
KeySym to;
struct KeySymRemapList_struct *next;
} KeySymRemapList;
typedef struct ModMaskRemapList_struct {
KeySym key;
CARD8 modMask;
struct ModMaskRemapList_struct *next;
} ModMaskRemapList;
/* Add remappings to our lists.
* Return true on success.
*/
Bool DarwinKeyboardKeySymRemapStr(const char *from, const char *to);
Bool DarwinKeyboardModMaskRemapStr(const char *key, const char *mask);
void DarwinKeyboardReload(DeviceIntPtr pDev);
unsigned int DarwinModeSystemKeymapSeed(void);
Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info);

View file

@ -52,6 +52,10 @@ SOFTWARE.
********************************************************/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#define NEED_EVENTS
#include <X11/X.h>
#include <X11/Xproto.h>

View file

@ -4,7 +4,6 @@ AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-DHAS_KL_API \
-DHAVE_XORG_CONFIG_H \
-I$(srcdir) -I$(srcdir)/.. \
-I$(top_srcdir)/miext/rootless

View file

@ -27,6 +27,10 @@
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 "quartzCommon.h"
#import "X11Application.h"

View file

@ -27,6 +27,10 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin"
#include "quartzCommon.h"

View file

@ -24,9 +24,11 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"
#define NEED_REPLIES

View file

@ -30,9 +30,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#import "XView.h"

View file

@ -26,9 +26,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

View file

@ -27,9 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

View file

@ -27,9 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "quartz/cr/cr.h"

View file

@ -26,9 +26,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "darwin.h"
#include "quartz/quartz.h"

View file

@ -28,9 +28,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"
#include "quartz/quartzCursor.h"
#include "darwin.h"

View file

@ -33,10 +33,11 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
#include "pseudoramiX.h"
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "pseudoramiX.h"
#include "extnsionst.h"
#include "dixstruct.h"
#include "window.h"

View file

@ -28,9 +28,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"
#include "quartz.h"
#include "darwin.h"

View file

@ -36,9 +36,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"
#include "quartzAudio.h"

View file

@ -32,8 +32,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"

View file

@ -28,9 +28,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"
#include "quartzCursor.h"
#include "darwin.h"

View file

@ -31,8 +31,8 @@
prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzCommon.h"

View file

@ -30,9 +30,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartzPasteboard.h"
#include <X11/Xatom.h>

View file

@ -27,6 +27,10 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <fcntl.h>
#include <unistd.h>
#include <CoreFoundation/CoreFoundation.h>
@ -35,7 +39,14 @@
#include "quartz.h"
#include "opaque.h"
#include "micmap.h"
#ifdef NDEBUG
#undef NDEBUG
#include <assert.h>
#define NDEBUG 1
#else
#include <assert.h>
#endif
char **envpGlobal; // argcGlobal and argvGlobal
// are from dix/globals.c

View file

@ -1,7 +1,6 @@
noinst_LIBRARIES = libxpr.a
AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS)
AM_CPPFLAGS = \
-DHAVE_XORG_CONFIG_H \
-I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \
-I$(top_srcdir)/miext \
-I$(top_srcdir)/miext/rootless \

View file

@ -35,9 +35,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/X.h>

View file

@ -34,10 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#ifdef XFree86LOADER

View file

@ -27,8 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "x-hash.h"

View file

@ -27,8 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "x-hook.h"

View file

@ -27,8 +27,8 @@
promote the sale, use or other dealings in this Software without
prior written authorization. */
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "x-list.h"

View file

@ -27,8 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "xpr.h"

View file

@ -29,8 +29,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"

View file

@ -27,8 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "xpr.h"

View file

@ -27,8 +27,8 @@
* use or other dealings in this Software without prior written authorization.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "quartz/quartzCommon.h"