diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2006-12-15 14:11:40 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> | 2006-12-15 14:19:54 -0500 |
commit | 04c721854fbf1bd6379c165a53fab2bdc09961c0 (patch) | |
tree | bb190574a3aaeb80d141d3d7c47d2ddd87afc5b2 /Xi | |
parent | 670bbb87310503fcc17203cecfa6f4f2f5db51d2 (diff) |
Convert callers of LookupWindow() to dixLookupWindow().
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/chgprop.c | 9 | ||||
-rw-r--r-- | Xi/exevents.c | 22 | ||||
-rw-r--r-- | Xi/getprop.c | 9 | ||||
-rw-r--r-- | Xi/getselev.c | 8 | ||||
-rw-r--r-- | Xi/selectev.c | 8 | ||||
-rw-r--r-- | Xi/ungrdevb.c | 7 | ||||
-rw-r--r-- | Xi/ungrdevk.c | 7 |
7 files changed, 35 insertions, 35 deletions
diff --git a/Xi/chgprop.c b/Xi/chgprop.c index 52c38838d..bab4597b8 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -106,7 +106,7 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client) int ProcXChangeDeviceDontPropagateList(register ClientPtr client) { - int i; + int i, rc; WindowPtr pWin; struct tmask tmp[EMASKSIZE]; OtherInputMasks *others; @@ -121,11 +121,10 @@ ProcXChangeDeviceDontPropagateList(register ClientPtr client) return Success; } - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadWindow); + rc); return Success; } 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)) { diff --git a/Xi/getprop.c b/Xi/getprop.c index 530841032..058c59514 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -100,7 +100,7 @@ int ProcXGetDeviceDontPropagateList(register ClientPtr client) { CARD16 count = 0; - int i; + int i, rc; XEventClass *buf = NULL, *tbuf; WindowPtr pWin; xGetDeviceDontPropagateListReply rep; @@ -115,11 +115,10 @@ ProcXGetDeviceDontPropagateList(register ClientPtr client) rep.length = 0; rep.count = 0; - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, - BadWindow); + rc); return Success; } diff --git a/Xi/getselev.c b/Xi/getselev.c index a84c33d23..533c66cd7 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -98,8 +98,7 @@ SProcXGetSelectedExtensionEvents(register ClientPtr client) int ProcXGetSelectedExtensionEvents(register ClientPtr client) { - int i; - int total_length = 0; + int i, rc, total_length = 0; xGetSelectedExtensionEventsReply rep; WindowPtr pWin; XEventClass *buf = NULL; @@ -118,9 +117,10 @@ ProcXGetSelectedExtensionEvents(register ClientPtr client) rep.this_client_count = 0; rep.all_clients_count = 0; - if (!(pWin = LookupWindow(stuff->window, client))) { + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0, - BadWindow); + rc); return Success; } diff --git a/Xi/selectev.c b/Xi/selectev.c index 7d3ef9d48..8c893ca1e 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -170,11 +170,9 @@ ProcXSelectExtensionEvent(register ClientPtr client) return Success; } - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, - BadWindow); + ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (ret != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret); return Success; } diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 64bb213f5..8db9307ce 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -105,6 +105,7 @@ ProcXUngrabDeviceButton(ClientPtr client) DeviceIntPtr mdev; WindowPtr pWin; GrabRec temporaryGrab; + int rc; REQUEST(xUngrabDeviceButtonReq); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); @@ -134,9 +135,9 @@ ProcXUngrabDeviceButton(ClientPtr client) } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - pWin = LookupWindow(stuff->grabWindow, client); - if (!pWin) { - SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadWindow); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc); return Success; } diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index 0a6b3b619..ebb83bce7 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -105,6 +105,7 @@ ProcXUngrabDeviceKey(ClientPtr client) DeviceIntPtr mdev; WindowPtr pWin; GrabRec temporaryGrab; + int rc; REQUEST(xUngrabDeviceKeyReq); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); @@ -133,9 +134,9 @@ ProcXUngrabDeviceKey(ClientPtr client) } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - pWin = LookupWindow(stuff->grabWindow, client); - if (!pWin) { - SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadWindow); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc); return Success; } if (((stuff->key > dev->key->curKeySyms.maxKeyCode) || |