summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
Diffstat (limited to 'xfixes')
-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);
}