[PATCH xf86-video-sis] Convert use of LookupWindow to dixLookupWindow

Jeremy Huddleston jeremyhu at apple.com
Sat Oct 29 17:47:32 PDT 2011


Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
1) Is DixReadAccess the right access for these?
2) What conditional CPP logic should I use for doing LookupWindow on older servers?

 src/sis_driver.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index a8af80c..6b5da57 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -2148,8 +2148,8 @@ SiSProcXineramaGetState(ClientPtr client)
     register int		n;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
-    pWin = LookupWindow(stuff->window, client);
-    if(!pWin) return BadWindow;
+    if(Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
+        return BadWindow;
 
     rep.type = X_Reply;
     rep.length = 0;
@@ -2172,8 +2172,8 @@ SiSProcXineramaGetScreenCount(ClientPtr client)
     register int			n;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
-    pWin = LookupWindow(stuff->window, client);
-    if(!pWin) return BadWindow;
+    if(Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
+        return BadWindow;
 
     rep.type = X_Reply;
     rep.length = 0;
@@ -2196,8 +2196,8 @@ SiSProcXineramaGetScreenSize(ClientPtr client)
     register int			n;
 
     REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
-    pWin = LookupWindow (stuff->window, client);
-    if(!pWin)  return BadWindow;
+    if(Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess))
+        return BadWindow;
 
     rep.type = X_Reply;
     rep.length = 0;
-- 
1.7.5.4




More information about the xorg-devel mailing list