summaryrefslogtreecommitdiff
path: root/Xext/xtest.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2006-12-19 10:31:40 +1030
committerPeter Hutterer <whot@hyena.localdomain>2006-12-19 10:31:40 +1030
commit2d0a63126b3d3a17005b7e122617ee0c5f44a55b (patch)
tree0b0fd193f19186e0e31d73f64b677a32bead44dc /Xext/xtest.c
parentd8b5394eda9d92b7193004931caa6c24a337b2e6 (diff)
parent1b029fd896b76096905c516925ce0214fe14632c (diff)
Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver
Diffstat (limited to 'Xext/xtest.c')
-rw-r--r--Xext/xtest.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 7b2aa755d..c59adeaee 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -139,12 +139,12 @@ ProcXTestCompareCursor(client)
xXTestCompareCursorReply rep;
WindowPtr pWin;
CursorPtr pCursor;
- register int n;
+ register int n, rc;
REQUEST_SIZE_MATCH(xXTestCompareCursorReq);
- pWin = (WindowPtr)LookupWindow(stuff->window, client);
- if (!pWin)
- return(BadWindow);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ if (rc != Success)
+ return rc;
if (stuff->cursor == None)
pCursor = NullCursor;
else if (stuff->cursor == XTestCurrentCursor)
@@ -173,12 +173,10 @@ ProcXTestFakeInput(client)
register ClientPtr client;
{
REQUEST(xXTestFakeInputReq);
- int nev;
- int n;
+ int nev, n, type, rc;
xEvent *ev;
DeviceIntPtr dev = NULL;
WindowPtr root;
- int type;
#ifdef XINPUT
Bool extension = FALSE;
deviceValuator *dv = NULL;
@@ -367,9 +365,10 @@ ProcXTestFakeInput(client)
root = GetCurrentRootWindow();
else
{
- root = LookupWindow(ev->u.keyButtonPointer.root, client);
- if (!root)
- return BadWindow;
+ rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client,
+ DixUnknownAccess);
+ if (rc != Success)
+ return rc;
if (root->parent)
{
client->errorValue = ev->u.keyButtonPointer.root;