diff options
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 6 | ||||
-rw-r--r-- | Xi/opendev.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 9e71a9e4e..fe297ab6a 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -248,7 +248,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) SetMaskForEvent(Motion_Filter(b), DeviceMotionNotify); if (!grab) if (CheckDeviceGrabs(other, xE, 0, count)) - return; + /* if a passive grab was activated, the event has been sent + * already */ + return; } else if (xE->u.u.type == DeviceButtonRelease) { if (!b) @@ -258,7 +260,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) *kptr &= ~bit; if (other->valuator) other->valuator->motionHintWindow = NullWindow; - if (!--b->buttonsDown) + if (b->buttonsDown >= 1 && !--b->buttonsDown) b->motionMask = 0; xE->u.u.detail = b->map[key]; if (xE->u.u.detail == 0) diff --git a/Xi/opendev.c b/Xi/opendev.c index 4b7b6a64f..0b0671d49 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -98,7 +98,6 @@ int ProcXOpenDevice(ClientPtr client) { xInputClassInfo evbase[numInputClasses]; - Bool enableit = FALSE; int j = 0; int status = Success; xOpenDeviceReply rep; @@ -121,7 +120,6 @@ ProcXOpenDevice(ClientPtr client) SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice); return Success; } - enableit = TRUE; } OpenInputDevice(dev, client, &status); @@ -129,8 +127,6 @@ ProcXOpenDevice(ClientPtr client) SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status); return Success; } - if (enableit && dev->inited && dev->startup) - (void)EnableDevice(dev); rep.repType = X_Reply; rep.RepType = X_OpenDevice; |