diff options
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 92a5f0599..b7645f443 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -505,6 +505,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin, confineTo; CursorPtr cursor; GrabPtr grab; + int rc; if ((this_device_mode != GrabModeSync) && (this_device_mode != GrabModeAsync)) { @@ -524,15 +525,15 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - pWin = LookupWindow(grabWindow, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; if (rconfineTo == None) confineTo = NullWindow; else { - confineTo = LookupWindow(rconfineTo, client); - if (!confineTo) - return BadWindow; + rc = dixLookupWindow(&confineTo, rconfineTo, client, DixUnknownAccess); + if (rc != Success) + return rc; } if (rcursor == None) cursor = NullCursor; @@ -562,6 +563,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; + int rc; if (k == NULL) return BadMatch; @@ -588,9 +590,9 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - pWin = LookupWindow(grabWindow, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; grab = CreateGrab(client->index, dev, pWin, mask, ownerEvents, this_device_mode, other_devices_mode, @@ -810,7 +812,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, } else effectiveFocus = pWin = inputFocus; } else - pWin = LookupWindow(dest, client); + dixLookupWindow(&pWin, dest, client, DixUnknownAccess); if (!pWin) return BadWindow; if ((propagate != xFalse) && (propagate != xTrue)) { |