diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-08-12 17:49:49 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-08-12 20:42:08 +0930 |
commit | 139c3ab7b754dc425a09d5f7b6d2a8fb2b88138a (patch) | |
tree | d9a972d94e3e65b497d2a10bc576dbc720055205 | |
parent | 998375f4154b000f75b2bafd4e276c0237d24dc7 (diff) |
Xi: return the state from the correct keyboard in QueryDevicePointer.
-rw-r--r-- | Xi/querydp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/querydp.c b/Xi/querydp.c index d63bed144..744a295ff 100644 --- a/Xi/querydp.c +++ b/Xi/querydp.c @@ -72,7 +72,7 @@ ProcXQueryDevicePointer(ClientPtr client) { int rc; xQueryDevicePointerReply rep; - DeviceIntPtr pDev; + DeviceIntPtr pDev, kbd; WindowPtr pWin, t; SpritePtr pSprite; @@ -100,12 +100,14 @@ ProcXQueryDevicePointer(ClientPtr client) if (pDev->valuator->motionHintWindow) MaybeStopHint(pDev, client); + kbd = GetPairedDevice(pDev); + pSprite = pDev->spriteInfo->sprite; rep.repType = X_Reply; rep.RepType = X_QueryDevicePointer; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.mask = pDev->button->state | inputInfo.keyboard->key->state; + rep.mask = pDev->button->state | (kbd && kbd->key) ? kbd->key->state : 0; rep.root = (GetCurrentRootWindow(pDev))->drawable.id; rep.rootX = pSprite->hot.x; rep.rootY = pSprite->hot.y; |