summaryrefslogtreecommitdiff
path: root/hw/darwin/quartz/pseudoramiX.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/darwin/quartz/pseudoramiX.c')
-rw-r--r--hw/darwin/quartz/pseudoramiX.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c
index ab57827d3..a003daf43 100644
--- a/hw/darwin/quartz/pseudoramiX.c
+++ b/hw/darwin/quartz/pseudoramiX.c
@@ -170,12 +170,13 @@ static int ProcPseudoramiXGetState(ClientPtr client)
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
- register int n;
+ register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- pWin = LookupWindow (stuff->window, client);
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ if (rc != Success)
+ return rc;
+
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -196,12 +197,13 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
REQUEST(xPanoramiXGetScreenCountReq);
WindowPtr pWin;
xPanoramiXGetScreenCountReply rep;
- register int n;
+ register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- pWin = LookupWindow (stuff->window, client);
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ if (rc != Success)
+ return rc;
+
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@@ -222,12 +224,13 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
REQUEST(xPanoramiXGetScreenSizeReq);
WindowPtr pWin;
xPanoramiXGetScreenSizeReply rep;
- register int n;
+ register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- pWin = LookupWindow (stuff->window, client);
- if (!pWin)
- return BadWindow;
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ if (rc != Success)
+ return rc;
+
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;