summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-09-24 10:11:00 -0400
committerAdam Jackson <ajax@redhat.com>2008-09-24 10:21:35 -0400
commit8d9defe8c2a685709318c1d43379443df3d2322a (patch)
treee9a8ecadc47f87304ad056dc12fbd33874618608
parenta39377cbcbd3091095efbeab25bec18ae520147e (diff)
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.
-rwxr-xr-xxfixes/cursor.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 4b85b7089..2a42a0b2c 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);
}