kdrive: add recolorCursor card function

In preparation for adding the Xfbdev X11 kdrive server

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
stefan11111
2025-07-06 14:55:43 +03:00
committed by Enrico Weigelt
parent 50cba096da
commit 6644e040ae
2 changed files with 12 additions and 0 deletions

View File

@@ -70,6 +70,11 @@ void KdSetColormap(ScreenPtr pScreen)
(*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen,
(1 << pScreenPriv->screen->fb.
depth), defs);
/* recolor hardware cursor */
if (pScreenPriv->card->cfuncs->recolorCursor)
(*pScreenPriv->card->cfuncs->recolorCursor) (pCmap->pScreen, 0, 0);
}
/*
@@ -229,4 +234,9 @@ KdStoreColors(ColormapPtr pCmap, int ndef, xColorItem * pdefs)
}
(*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, ndef, pdefs);
/* recolor hardware cursor */
if (pScreenPriv->card->cfuncs->recolorCursor)
(*pScreenPriv->card->cfuncs->recolorCursor) (pCmap->pScreen, ndef,
pdefs);
}

View File

@@ -35,6 +35,7 @@
#include "pixmapstr.h"
#include "windowstr.h"
#include "servermd.h"
#include "colormapst.h"
#include "gcstruct.h"
#include "input.h"
#include "mipointer.h"
@@ -116,6 +117,7 @@ typedef struct _KdCardFuncs {
void (*cardfini) (KdCardInfo *); /* close down */
Bool (*initCursor) (ScreenPtr); /* detect and map cursor */
void (*recolorCursor) (ScreenPtr, int, xColorItem *);
Bool (*initAccel) (ScreenPtr);
void (*enableAccel) (ScreenPtr);