dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard.
This commit is contained in:
parent
f01ee198ff
commit
639658b2ea
|
@ -4626,6 +4626,7 @@ ProcQueryPointer(ClientPtr client)
|
||||||
xQueryPointerReply rep;
|
xQueryPointerReply rep;
|
||||||
WindowPtr pWin, t;
|
WindowPtr pWin, t;
|
||||||
DeviceIntPtr mouse = PickPointer(client);
|
DeviceIntPtr mouse = PickPointer(client);
|
||||||
|
DeviceIntPtr keyboard;
|
||||||
SpritePtr pSprite;
|
SpritePtr pSprite;
|
||||||
int rc;
|
int rc;
|
||||||
REQUEST(xResourceReq);
|
REQUEST(xResourceReq);
|
||||||
|
@ -4638,6 +4639,8 @@ ProcQueryPointer(ClientPtr client)
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
keyboard = GetPairedDevice(mouse);
|
||||||
|
|
||||||
pSprite = mouse->spriteInfo->sprite;
|
pSprite = mouse->spriteInfo->sprite;
|
||||||
if (mouse->valuator->motionHintWindow)
|
if (mouse->valuator->motionHintWindow)
|
||||||
MaybeStopHint(mouse, client);
|
MaybeStopHint(mouse, client);
|
||||||
|
@ -4645,7 +4648,7 @@ ProcQueryPointer(ClientPtr client)
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
rep.sequenceNumber = client->sequence;
|
rep.sequenceNumber = client->sequence;
|
||||||
rep.mask = mouse->button->state;
|
rep.mask = mouse->button->state;
|
||||||
rep.mask |= XkbStateFieldFromRec(&inputInfo.keyboard->key->xkbInfo->state);
|
rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state);
|
||||||
rep.length = 0;
|
rep.length = 0;
|
||||||
rep.root = (RootWindow(mouse))->drawable.id;
|
rep.root = (RootWindow(mouse))->drawable.id;
|
||||||
rep.rootX = pSprite->hot.x;
|
rep.rootX = pSprite->hot.x;
|
||||||
|
|
Loading…
Reference in New Issue