summaryrefslogtreecommitdiff
path: root/src/atimach64cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atimach64cursor.c')
-rw-r--r--src/atimach64cursor.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/atimach64cursor.c b/src/atimach64cursor.c
index be8ea11..a3488bb 100644
--- a/src/atimach64cursor.c
+++ b/src/atimach64cursor.c
@@ -25,8 +25,8 @@
#endif
#include "ati.h"
+#include "aticursor.h"
#include "atimach64accel.h"
-#include "atimach64cursor.h"
#include "atimach64io.h"
/*
@@ -364,9 +364,26 @@ ATIMach64UseHWCursor
Bool
ATIMach64CursorInit
(
- xf86CursorInfoPtr pCursorInfo
+ ScreenPtr pScreen
)
{
+ ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
+ ATIPtr pATI = ATIPTR(pScreenInfo);
+ xf86CursorInfoPtr pCursorInfo;
+
+ /* Initialise software cursor */
+ if (!miDCInitialize(pScreen, xf86GetPointerScreenFuncs()))
+ return FALSE;
+
+ if (pATI->Cursor == ATI_CURSOR_SOFTWARE)
+ return TRUE;
+
+ /* Initialise hardware cursor */
+ if (!(pATI->pCursorInfo = xf86CreateCursorInfoRec()))
+ return FALSE;
+
+ pCursorInfo = pATI->pCursorInfo;
+
/*
* For Mach64 variants, toggling hardware cursors off and on causes display
* artifacts. Ask the cursor support layers to always paint the cursor
@@ -397,5 +414,13 @@ ATIMach64CursorInit
pCursorInfo->ShowCursor = ATIMach64ShowCursor;
pCursorInfo->UseHWCursor = ATIMach64UseHWCursor;
+ if (!xf86InitCursor(pScreen, pATI->pCursorInfo))
+ {
+ xf86DestroyCursorInfoRec(pATI->pCursorInfo);
+ pATI->pCursorInfo = NULL;
+ return FALSE;
+ }
+
+ xf86SetSilkenMouse(pScreen);
return TRUE;
}