Merge branch 'server-1.4-branch' into xorg-server-1.4-apple

This commit is contained in:
Jeremy Huddleston 2007-12-07 14:14:32 -08:00
commit 4ae5621664
9 changed files with 46 additions and 14 deletions

View File

@ -70,6 +70,7 @@ SProcPanoramiXGetState(ClientPtr client)
swaps (&stuff->length, n); swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
swapl (&stuff->window, n);
return ProcPanoramiXGetState(client); return ProcPanoramiXGetState(client);
} }
@ -81,6 +82,7 @@ SProcPanoramiXGetScreenCount(ClientPtr client)
swaps (&stuff->length, n); swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
swapl (&stuff->window, n);
return ProcPanoramiXGetScreenCount(client); return ProcPanoramiXGetScreenCount(client);
} }
@ -92,6 +94,8 @@ SProcPanoramiXGetScreenSize(ClientPtr client)
swaps (&stuff->length, n); swaps (&stuff->length, n);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
swapl (&stuff->window, n);
swapl (&stuff->screen, n);
return ProcPanoramiXGetScreenSize(client); return ProcPanoramiXGetScreenSize(client);
} }

View File

@ -244,7 +244,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count)
other->valuator->motionHintWindow = NullWindow; other->valuator->motionHintWindow = NullWindow;
b->buttonsDown++; b->buttonsDown++;
b->motionMask = DeviceButtonMotionMask; b->motionMask = DeviceButtonMotionMask;
xE->u.u.detail = b->map[key]; xE->u.u.detail = key;
if (xE->u.u.detail == 0) if (xE->u.u.detail == 0)
return; return;
if (xE->u.u.detail <= 5) if (xE->u.u.detail <= 5)
@ -266,7 +266,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count)
other->valuator->motionHintWindow = NullWindow; other->valuator->motionHintWindow = NullWindow;
if (b->buttonsDown >= 1 && !--b->buttonsDown) if (b->buttonsDown >= 1 && !--b->buttonsDown)
b->motionMask = 0; b->motionMask = 0;
xE->u.u.detail = b->map[key]; xE->u.u.detail = key;
if (xE->u.u.detail == 0) if (xE->u.u.detail == 0)
return; return;
if (xE->u.u.detail <= 5) if (xE->u.u.detail <= 5)

View File

@ -134,10 +134,11 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop)
str = ret; str = ret;
for (i = 0; props[i]; i++) { for (i = 0; props[i]; i++) {
str = strcpy(str, props[i]); strcpy(str, props[i]);
str += strlen(props[i]);
*str++ = ','; *str++ = ',';
} }
*str = '\0'; *(str-1) = '\0';
libhal_free_string_array(props); libhal_free_string_array(props);
} }

View File

@ -47,7 +47,9 @@ InitCard (char *name)
void void
InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv)
{ {
#ifdef GLXEXT
noGlxExtension=TRUE; noGlxExtension=TRUE;
#endif
KdInitOutput (pScreenInfo, argc, argv); KdInitOutput (pScreenInfo, argc, argv);
} }

View File

@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
int int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{ {
xf86ProcessActionEvent(ACTION_TERMINATE, NULL); if (dev != inputInfo.keyboard)
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
return 0; return 0;
} }

View File

@ -262,7 +262,7 @@ WaitForSomething(int *pClientsReady)
FatalError("WaitForSomething(): select: errno=%d\n", FatalError("WaitForSomething(): select: errno=%d\n",
selecterr); selecterr);
} }
else if (selecterr != EINTR) else if (selecterr != EINTR && selecterr != EAGAIN)
{ {
ErrorF("WaitForSomething(): select: errno=%d\n", ErrorF("WaitForSomething(): select: errno=%d\n",
selecterr); selecterr);

View File

@ -1014,9 +1014,12 @@ CheckConnections(void)
curclient = curoff + (i * (sizeof(fd_mask)*8)); curclient = curoff + (i * (sizeof(fd_mask)*8));
FD_ZERO(&tmask); FD_ZERO(&tmask);
FD_SET(curclient, &tmask); FD_SET(curclient, &tmask);
r = Select (curclient + 1, &tmask, NULL, NULL, &notime); do {
r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
} while (r < 0 && (errno == EINTR || errno == EAGAIN));
if (r < 0) if (r < 0)
CloseDownClient(clients[ConnectionTranslation[curclient]]); if (ConnectionTranslation[curclient] > 0)
CloseDownClient(clients[ConnectionTranslation[curclient]]);
mask &= ~((fd_mask)1 << curoff); mask &= ~((fd_mask)1 << curoff);
} }
} }
@ -1027,9 +1030,12 @@ CheckConnections(void)
curclient = XFD_FD(&savedAllClients, i); curclient = XFD_FD(&savedAllClients, i);
FD_ZERO(&tmask); FD_ZERO(&tmask);
FD_SET(curclient, &tmask); FD_SET(curclient, &tmask);
r = Select (curclient + 1, &tmask, NULL, NULL, &notime); do {
if (r < 0 && GetConnectionTranslation(curclient) > 0) r = Select (curclient + 1, &tmask, NULL, NULL, &notime);
CloseDownClient(clients[GetConnectionTranslation(curclient)]); } while (r < 0 && (errno == EINTR || errno == EAGAIN));
if (r < 0)
if (GetConnectionTranslation(curclient) > 0)
CloseDownClient(clients[GetConnectionTranslation(curclient)]);
} }
#endif #endif
} }

View File

@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
int int
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
{ {
GiveUp(1); if (dev != inputInfo.keyboard)
GiveUp(1);
return 0; return 0;
} }

View File

@ -561,6 +561,9 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi,
int x,y; int x,y;
Bool accel; Bool accel;
if (xkbi->device == inputInfo.keyboard)
return 0;
if (filter->keycode==0) { /* initial press */ if (filter->keycode==0) { /* initial press */
filter->keycode = keycode; filter->keycode = keycode;
filter->active = 1; filter->active = 1;
@ -601,6 +604,9 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi,
unsigned keycode, unsigned keycode,
XkbAction * pAction) XkbAction * pAction)
{ {
if (xkbi->device == inputInfo.keyboard)
return 0;
if (filter->keycode==0) { /* initial press */ if (filter->keycode==0) { /* initial press */
int button= pAction->btn.button; int button= pAction->btn.button;
@ -980,8 +986,11 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
unsigned keycode, unsigned keycode,
XkbAction * pAction) XkbAction * pAction)
{ {
DeviceIntPtr dev = xkbi->device;
if (dev == inputInfo.keyboard)
return 0;
if (filter->keycode==0) { /* initial press */ if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
filter->keycode = keycode; filter->keycode = keycode;
filter->active = 1; filter->active = 1;
filter->filterOthers = 0; filter->filterOthers = 0;
@ -1003,8 +1012,11 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
unsigned keycode, unsigned keycode,
XkbAction * pAction) XkbAction * pAction)
{ {
DeviceIntPtr dev = xkbi->device;
if (dev == inputInfo.keyboard)
return 0;
if (filter->keycode==0) { /* initial press */ if (filter->keycode==0) { /* initial press */
DeviceIntPtr dev = xkbi->device;
filter->keycode = keycode; filter->keycode = keycode;
filter->active = 1; filter->active = 1;
filter->filterOthers = 0; filter->filterOthers = 0;
@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
DeviceIntPtr dev; DeviceIntPtr dev;
int button; int button;
if (dev == inputInfo.keyboard)
return 0;
if (filter->keycode==0) { /* initial press */ if (filter->keycode==0) { /* initial press */
dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL); dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice())) if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))