Skip to content

Commit

Permalink
dix: ProcSendEvent shouldn't use inputInfo.keyboard directly.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hutterer <[email protected]>
  • Loading branch information
whot committed Mar 20, 2009
1 parent 12aeddf commit e8094d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dix/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -4759,7 +4759,9 @@ ProcSendEvent(ClientPtr client)
{
WindowPtr pWin;
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite;
DeviceIntPtr dev = PickPointer(client);
DeviceIntPtr keybd = GetPairedDevice(dev);
SpritePtr pSprite = dev->spriteInfo->sprite;
REQUEST(xSendEventReq);

REQUEST_SIZE_MATCH(xSendEventReq);
Expand Down Expand Up @@ -4793,7 +4795,7 @@ ProcSendEvent(ClientPtr client)
pWin = pSprite->win;
else if (stuff->destination == InputFocus)
{
WindowPtr inputFocus = inputInfo.keyboard->focus->win;
WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin;

if (inputFocus == NoneWin)
return Success;
Expand Down

0 comments on commit e8094d8

Please sign in to comment.