dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard.

Affected calls:
 ProcChangeKeyboardControl
 ProcBell
 ProcUngrabKey
 ProcUngrabButton
This commit is contained in:
Peter Hutterer 2009-03-13 14:59:18 +10:00
commit 18430616cf
2 changed files with 19 additions and 10 deletions

View file

@ -4880,7 +4880,7 @@ ProcUngrabKey(ClientPtr client)
tempGrab.window = pWin;
tempGrab.modifiersDetail.exact = stuff->modifiers;
tempGrab.modifiersDetail.pMask = NULL;
tempGrab.modifierDevice = inputInfo.keyboard;
tempGrab.modifierDevice = GetPairedDevice(keybd);
tempGrab.type = KeyPress;
tempGrab.detail.exact = stuff->key;
tempGrab.detail.pMask = NULL;
@ -5055,6 +5055,7 @@ ProcUngrabButton(ClientPtr client)
WindowPtr pWin;
GrabRec tempGrab;
int rc;
DeviceIntPtr ptr;
REQUEST_SIZE_MATCH(xUngrabButtonReq);
if ((stuff->modifiers != AnyModifier) &&
@ -5066,12 +5067,15 @@ ProcUngrabButton(ClientPtr client)
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess);
if (rc != Success)
return rc;
ptr = PickPointer(client);
tempGrab.resource = client->clientAsMask;
tempGrab.device = PickPointer(client);
tempGrab.device = ptr;
tempGrab.window = pWin;
tempGrab.modifiersDetail.exact = stuff->modifiers;
tempGrab.modifiersDetail.pMask = NULL;
tempGrab.modifierDevice = inputInfo.keyboard;
tempGrab.modifierDevice = GetPairedDevice(ptr);
tempGrab.type = ButtonPress;
tempGrab.detail.exact = stuff->button;
tempGrab.detail.pMask = NULL;