xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Wed Sep 24 07:25:40 PDT 2008


 xfixes/cursor.c |   32 +++++++-------------------------
 1 file changed, 7 insertions(+), 25 deletions(-)

New commits:
commit 8d9defe8c2a685709318c1d43379443df3d2322a
Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Sep 24 10:11:00 2008 -0400

    Fix un-suppressing the initial cursor.
    
    The intended behaviour was "show as soon as someone calls
    XDefineCursor".  What you actually got was, uh, slightly less well
    defined, since the screen's ChangeWindowAttributes hook would run after
    DIX handled the cursor change.  Oops.
    
    The trivial way to turn the cursor on is:
    % xsetroot -cursor_name gumby
    
    Refer to /usr/include/X11/cursorfont.h for cursor names.
    
    Thanks to anholt for catching this.

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 4b85b70..2a42a0b 100755
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -111,7 +111,6 @@ typedef struct _CursorHideCountRec {
 
 typedef struct _CursorScreen {
     DisplayCursorProcPtr	DisplayCursor;
-    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
     CloseScreenProcPtr		CloseScreen;
     CursorHideCountPtr          pCursorHideCounts;
 } CursorScreenRec, *CursorScreenPtr;
@@ -135,6 +134,13 @@ CursorDisplayCursor (DeviceIntPtr pDev,
 
     Unwrap (cs, pScreen, DisplayCursor);
 
+    /*
+     * Have to check ConnectionInfo to distinguish client requests from
+     * initial root window setup.  Not a great way to do it, I admit.
+     */
+    if (ConnectionInfo)
+	CursorVisible = TRUE;
+
     if (cs->pCursorHideCounts != NULL || !CursorVisible) {
 	ret = (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor);
     } else {
@@ -168,27 +174,6 @@ CursorDisplayCursor (DeviceIntPtr pDev,
 }
 
 static Bool
-CursorChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
-{
-    ScreenPtr           pScreen = pWin->drawable.pScreen;
-    CursorScreenPtr	cs = GetCursorScreen(pScreen);
-    Bool		ret;
-
-    /*
-     * Have to check ConnectionInfo to distinguish client requests from
-     * initial root window setup.  Not a great way to do it, I admit.
-     */
-    if ((mask & CWCursor) && ConnectionInfo)
-	CursorVisible = TRUE;
-
-    Unwrap(cs, pScreen, ChangeWindowAttributes);
-    ret = pScreen->ChangeWindowAttributes(pWin, mask);
-    Wrap(cs, pScreen, ChangeWindowAttributes, CursorChangeWindowAttributes);
-
-    return ret;
-}
-
-static Bool
 CursorCloseScreen (int index, ScreenPtr pScreen)
 {
     CursorScreenPtr	cs = GetCursorScreen (pScreen);
@@ -196,7 +181,6 @@ CursorCloseScreen (int index, ScreenPtr pScreen)
 
     Unwrap (cs, pScreen, CloseScreen);
     Unwrap (cs, pScreen, DisplayCursor);
-    Unwrap (cs, pScreen, ChangeWindowAttributes);
     deleteCursorHideCountsForScreen(pScreen);
     ret = (*pScreen->CloseScreen) (index, pScreen);
     xfree (cs);
@@ -1074,8 +1058,6 @@ XFixesCursorInit (void)
 	    return FALSE;
 	Wrap (cs, pScreen, CloseScreen, CursorCloseScreen);
 	Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor);
-	Wrap (cs, pScreen, ChangeWindowAttributes,
-	      CursorChangeWindowAttributes);
 	cs->pCursorHideCounts = NULL;
 	SetCursorScreen (pScreen, cs);
     }


More information about the xorg-commit mailing list