diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index da445ffe1..0487471aa 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -70,6 +70,7 @@ SProcPanoramiXGetState(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + swapl (&stuff->window, n); return ProcPanoramiXGetState(client); } @@ -81,6 +82,7 @@ SProcPanoramiXGetScreenCount(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + swapl (&stuff->window, n); return ProcPanoramiXGetScreenCount(client); } @@ -92,6 +94,8 @@ SProcPanoramiXGetScreenSize(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + swapl (&stuff->window, n); + swapl (&stuff->screen, n); return ProcPanoramiXGetScreenSize(client); } diff --git a/Xi/exevents.c b/Xi/exevents.c index 377311ec9..7cf0c50a5 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -244,7 +244,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) other->valuator->motionHintWindow = NullWindow; b->buttonsDown++; b->motionMask = DeviceButtonMotionMask; - xE->u.u.detail = b->map[key]; + xE->u.u.detail = key; if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) @@ -266,7 +266,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) other->valuator->motionHintWindow = NullWindow; if (b->buttonsDown >= 1 && !--b->buttonsDown) b->motionMask = 0; - xE->u.u.detail = b->map[key]; + xE->u.u.detail = key; if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) diff --git a/config/hal.c b/config/hal.c index 6bb449d5a..4427deb39 100644 --- a/config/hal.c +++ b/config/hal.c @@ -134,10 +134,11 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) str = ret; for (i = 0; props[i]; i++) { - str = strcpy(str, props[i]); + strcpy(str, props[i]); + str += strlen(props[i]); *str++ = ','; } - *str = '\0'; + *(str-1) = '\0'; libhal_free_string_array(props); } diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index c33892ce0..e4ff97585 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -47,7 +47,9 @@ InitCard (char *name) void InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) { +#ifdef GLXEXT noGlxExtension=TRUE; +#endif KdInitOutput (pScreenInfo, argc, argv); } diff --git a/hw/xfree86/dixmods/xkbKillSrv.c b/hw/xfree86/dixmods/xkbKillSrv.c index b3399db4a..9074fd390 100644 --- a/hw/xfree86/dixmods/xkbKillSrv.c +++ b/hw/xfree86/dixmods/xkbKillSrv.c @@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) { - xf86ProcessActionEvent(ACTION_TERMINATE, NULL); + if (dev != inputInfo.keyboard) + xf86ProcessActionEvent(ACTION_TERMINATE, NULL); + return 0; } diff --git a/os/WaitFor.c b/os/WaitFor.c index ec1592c01..65f53c5df 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -262,7 +262,7 @@ WaitForSomething(int *pClientsReady) FatalError("WaitForSomething(): select: errno=%d\n", selecterr); } - else if (selecterr != EINTR) + else if (selecterr != EINTR && selecterr != EAGAIN) { ErrorF("WaitForSomething(): select: errno=%d\n", selecterr); diff --git a/os/connection.c b/os/connection.c index 07e1eaa5f..98af1daca 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1014,9 +1014,12 @@ CheckConnections(void) curclient = curoff + (i * (sizeof(fd_mask)*8)); FD_ZERO(&tmask); FD_SET(curclient, &tmask); - r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + do { + r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + } while (r < 0 && (errno == EINTR || errno == EAGAIN)); if (r < 0) - CloseDownClient(clients[ConnectionTranslation[curclient]]); + if (ConnectionTranslation[curclient] > 0) + CloseDownClient(clients[ConnectionTranslation[curclient]]); mask &= ~((fd_mask)1 << curoff); } } @@ -1027,9 +1030,12 @@ CheckConnections(void) curclient = XFD_FD(&savedAllClients, i); FD_ZERO(&tmask); FD_SET(curclient, &tmask); - r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); - if (r < 0 && GetConnectionTranslation(curclient) > 0) - CloseDownClient(clients[GetConnectionTranslation(curclient)]); + do { + r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + } while (r < 0 && (errno == EINTR || errno == EAGAIN)); + if (r < 0) + if (GetConnectionTranslation(curclient) > 0) + CloseDownClient(clients[GetConnectionTranslation(curclient)]); } #endif } diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c index a573ecbd8..3b5fd5353 100644 --- a/xkb/ddxKillSrv.c +++ b/xkb/ddxKillSrv.c @@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) { - GiveUp(1); + if (dev != inputInfo.keyboard) + GiveUp(1); + return 0; } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 8ddbdba3d..6edac292e 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -561,6 +561,9 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi, int x,y; Bool accel; + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ filter->keycode = keycode; filter->active = 1; @@ -601,6 +604,9 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ int button= pAction->btn.button; @@ -980,8 +986,11 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1003,8 +1012,11 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi, DeviceIntPtr dev; int button; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL); if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))