Merge remote branch 'origin/xorg-server-1.7-apple' into server-1.7-branch

This commit is contained in:
Peter Hutterer 2009-09-28 09:54:53 +10:00
commit 4aeac52c49
6 changed files with 17 additions and 28 deletions

View file

@ -192,7 +192,7 @@ XIGetDevice(xEvent* xE)
* This code is basically the old SwitchCoreKeyboard. * This code is basically the old SwitchCoreKeyboard.
*/ */
static void void
CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master)
{ {
KeyClassPtr mk = master->key; KeyClassPtr mk = master->key;

View file

@ -103,7 +103,7 @@ static void handleStencilModes(struct glCapabilitiesConfig *c, GLint smodes) {
} }
static int handleColorAndAccumulation(struct glColorBufCapabilities *c, static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
GLint cmodes) { GLint cmodes, int forAccum) {
int offset = 0; int offset = 0;
/*1*/ /*1*/
@ -204,8 +204,9 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
++offset; ++offset;
} }
#if 0 if(forAccum) {
/* //#if 0
/* FIXME
* Disable this path, because some part of libGL, X, or Xplugin * Disable this path, because some part of libGL, X, or Xplugin
* doesn't work with sizes greater than 8. * doesn't work with sizes greater than 8.
* When this is enabled and visuals are chosen using depths * When this is enabled and visuals are chosen using depths
@ -274,7 +275,8 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
c[offset].a = 16; c[offset].a = 16;
++offset; ++offset;
} }
#endif }
//#endif
/* FIXME should we handle the floating point color modes, and if so, how? */ /* FIXME should we handle the floating point color modes, and if so, how? */
@ -284,14 +286,14 @@ static int handleColorAndAccumulation(struct glColorBufCapabilities *c,
static void handleColorModes(struct glCapabilitiesConfig *c, GLint cmodes) { static void handleColorModes(struct glCapabilitiesConfig *c, GLint cmodes) {
c->total_color_buffers = handleColorAndAccumulation(c->color_buffers, c->total_color_buffers = handleColorAndAccumulation(c->color_buffers,
cmodes); cmodes, 0);
assert(c->total_color_buffers < GLCAPS_COLOR_BUFFERS); assert(c->total_color_buffers < GLCAPS_COLOR_BUFFERS);
} }
static void handleAccumulationModes(struct glCapabilitiesConfig *c, GLint cmodes) { static void handleAccumulationModes(struct glCapabilitiesConfig *c, GLint cmodes) {
c->total_accum_buffers = handleColorAndAccumulation(c->accum_buffers, c->total_accum_buffers = handleColorAndAccumulation(c->accum_buffers,
cmodes); cmodes, 1);
assert(c->total_accum_buffers < GLCAPS_COLOR_BUFFERS); assert(c->total_accum_buffers < GLCAPS_COLOR_BUFFERS);
} }

View file

@ -67,8 +67,7 @@
#include <IOKit/hidsystem/IOHIDLib.h> #include <IOKit/hidsystem/IOHIDLib.h>
#ifdef MITSHM #ifdef MITSHM
#define _XSHM_SERVER_ #include "shmint.h"
#include <X11/extensions/XShm.h>
#endif #endif
#include "darwin.h" #include "darwin.h"
@ -291,8 +290,8 @@ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) {
#define NAXES 2 #define NAXES 2
// 7 buttons: left, right, middle, then four scroll wheel "buttons" // 7 buttons: left, right, middle, then four scroll wheel "buttons"
CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3, 4, 5, 6, 7}; CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3, 4, 5, 6, 7};
Atom btn_labels[NAXES] = {0}; Atom btn_labels[NBUTTONS] = {0};
Atom axes_labels[NBUTTONS] = {0}; Atom axes_labels[NAXES] = {0};
switch (what) { switch (what) {
case DEVICE_INIT: case DEVICE_INIT:
@ -341,8 +340,8 @@ static int DarwinTabletProc(DeviceIntPtr pPointer, int what) {
#define NBUTTONS 3 #define NBUTTONS 3
#define NAXES 5 #define NAXES 5
CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3}; CARD8 map[NBUTTONS + 1] = {0, 1, 2, 3};
Atom axes_labels[NAXES] = {0};
Atom btn_labels[NBUTTONS] = {0}; Atom btn_labels[NBUTTONS] = {0};
Atom axes_labels[NAXES] = {0};
switch (what) { switch (what) {
case DEVICE_INIT: case DEVICE_INIT:
@ -354,6 +353,9 @@ static int DarwinTabletProc(DeviceIntPtr pPointer, int what) {
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X);
axes_labels[4] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y);
// Set button map. // Set button map.
InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS, InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS,

View file

@ -96,20 +96,6 @@ static void set_x11_path() {
exit(3); exit(3);
} }
ver = CFBundleGetVersionNumber(bundle);
if( !(ver >= 0x02308000 || (ver >= 0x02168000 && ver < 0x02208000))) {
CFStringRef versionStr = CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleVersionKey);
const char * versionCStr = "Unknown";
if(versionStr)
versionCStr = CFStringGetCStringPtr(versionStr, kCFStringEncodingMacRoman);
fprintf(stderr, "Xquartz: Could not find a new enough X11.app LSFindApplicationForInfo() returned\n");
fprintf(stderr, " X11.app = %s\n", x11_path);
fprintf(stderr, " Version = %s (%x), Expected Version > 2.3.0 or 2.1.6\n", versionCStr, (unsigned)ver);
exit(9);
}
strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path));
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "Xquartz: X11.app = %s\n", x11_path); fprintf(stderr, "Xquartz: X11.app = %s\n", x11_path);

View file

@ -296,13 +296,11 @@ static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) {
static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms, CARD8 *modmap) { static void DarwinKeyboardSetDeviceKeyMap(KeySymsRec *keySyms, CARD8 *modmap) {
DeviceIntPtr pDev; DeviceIntPtr pDev;
pthread_mutex_lock(&keyInfo_mutex);
for (pDev = inputInfo.devices; pDev; pDev = pDev->next) for (pDev = inputInfo.devices; pDev; pDev = pDev->next)
if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key)
XkbApplyMappingChange(pDev, keySyms, keySyms->minKeyCode, XkbApplyMappingChange(pDev, keySyms, keySyms->minKeyCode,
keySyms->maxKeyCode - keySyms->minKeyCode + 1, keySyms->maxKeyCode - keySyms->minKeyCode + 1,
modmap, serverClient); modmap, serverClient);
pthread_mutex_unlock(&keyInfo_mutex);
} }
/* /*

View file

@ -592,6 +592,7 @@ extern Bool IsKeyboardDevice(DeviceIntPtr dev);
extern Bool IsPointerEvent(InternalEvent *event); extern Bool IsPointerEvent(InternalEvent *event);
extern Bool IsMaster(DeviceIntPtr dev); extern Bool IsMaster(DeviceIntPtr dev);
extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master);
extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what); extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what);
extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what); extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what);