summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 85390e30..790d4be1 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -2017,10 +2017,12 @@ static Bool RADEONCursorInit_KMS(ScreenPtr pScreen)
return FALSE;
}
- info->SetCursor = PointPriv->spriteFuncs->SetCursor;
- info->MoveCursor = PointPriv->spriteFuncs->MoveCursor;
- PointPriv->spriteFuncs->SetCursor = drmmode_sprite_set_cursor;
- PointPriv->spriteFuncs->MoveCursor = drmmode_sprite_move_cursor;
+ if (PointPriv->spriteFuncs->SetCursor != drmmode_sprite_set_cursor) {
+ info->SetCursor = PointPriv->spriteFuncs->SetCursor;
+ info->MoveCursor = PointPriv->spriteFuncs->MoveCursor;
+ PointPriv->spriteFuncs->SetCursor = drmmode_sprite_set_cursor;
+ PointPriv->spriteFuncs->MoveCursor = drmmode_sprite_move_cursor;
+ }
}
if (xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE))
@@ -2184,8 +2186,10 @@ static Bool RADEONCloseScreen_KMS(ScreenPtr pScreen)
miPointerScreenPtr PointPriv =
dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
- PointPriv->spriteFuncs->SetCursor = info->SetCursor;
- PointPriv->spriteFuncs->MoveCursor = info->MoveCursor;
+ if (PointPriv->spriteFuncs->SetCursor == drmmode_sprite_set_cursor) {
+ PointPriv->spriteFuncs->SetCursor = info->SetCursor;
+ PointPriv->spriteFuncs->MoveCursor = info->MoveCursor;
+ }
}
pScreen->BlockHandler = info->BlockHandler;