xserver: Branch 'master' - 2 commits

Peter Hutterer whot at kemper.freedesktop.org
Wed Jun 17 22:23:43 PDT 2009


 hw/xfree86/ramdac/xf86Cursor.c |    7 ++++---
 record/record.c                |   16 ++++++++++------
 2 files changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 1e9907499c27321a2aa5dc8a75a375b7a82c999a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jun 18 15:14:00 2009 +1000

    record: use dixLookupResourceByClass instead of LookupIDByClass.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/record/record.c b/record/record.c
index cb7a627..3c4bb9e 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1166,10 +1166,12 @@ RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec)
  * Side Effects: none.
  */
 static int
-RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
+RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec)
 {
     int i;
     int clientIndex;
+    int rc;
+    pointer value;
 
     for (i = 0; i < nspecs; i++)
     {
@@ -1185,8 +1187,10 @@ RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
 	{
 	    if (clientspecs[i] == clients[clientIndex]->clientAsMask)
 		continue;
-	    if (!LookupIDByClass(clientspecs[i], RC_ANY))
-		return BadMatch;
+            rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY,
+                                          client, DixGetAttrAccess);
+            if (rc != Success)
+                return rc;
 	}
 	else
 	    return BadMatch;
@@ -1342,8 +1346,8 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xR
 
     recordingClient = pContext->pRecordingClient ?
 		      pContext->pRecordingClient->clientAsMask : 0;
-    err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], stuff->nClients,
-					    recordingClient);
+    err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
+					    stuff->nClients, recordingClient);
     if (err != Success) return err;
 
     pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients);
@@ -1958,7 +1962,7 @@ ProcRecordUnregisterClients(ClientPtr client)
 	4 * stuff->nClients)
 	return BadLength;
     VERIFY_CONTEXT(pContext, stuff->context, client);
-    err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1],
+    err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
 					    stuff->nClients, 0);
     if (err != Success)
 	return err;
commit 66089e9129a821cfb1983d3d35f41b975a52de5e
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Mar 25 12:55:42 2009 +1000

    xfree86: fix SWCursor check in xf86CursorSetCursor.
    
    Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when
    the pointer left the screen (in a Xinerama setup).
    We must call the sprite rendering function if
    - SW cursors are enabled, or
    - The current device is not the VCP and not attached to the VCP.
    
    Reported-by: Gordon Yuan <GordonYuan at viatech.com.cn>
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index b866550..b474ff3 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -302,9 +302,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
 
 
     if (pCurs == NullCursor) {	/* means we're supposed to remove the cursor */
-        if (ScreenPriv->SWCursor || pDev != inputInfo.pointer)
-            (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor,
-                                                  x, y);
+        if (ScreenPriv->SWCursor ||
+            !(pDev == inputInfo.pointer || !IsMaster(pDev) &&
+                GetMaster(pDev->u.master, MASTER_POINTER) == inputInfo.pointer))
+                (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y);
         else if (ScreenPriv->isUp) {
             xf86SetCursor(pScreen, NullCursor, x, y);
             ScreenPriv->isUp = FALSE;


More information about the xorg-commit mailing list