From 6644e040ae39154a0ea7a7e9fc9db5e6ae0fbaef Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Sun, 6 Jul 2025 14:55:43 +0300 Subject: [PATCH] kdrive: add recolorCursor card function In preparation for adding the Xfbdev X11 kdrive server Signed-off-by: stefan11111 Signed-off-by: Enrico Weigelt, metux IT consult --- hw/kdrive/src/kcmap.c | 10 ++++++++++ hw/kdrive/src/kdrive.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/hw/kdrive/src/kcmap.c b/hw/kdrive/src/kcmap.c index 5e707e7cab..94660e688e 100644 --- a/hw/kdrive/src/kcmap.c +++ b/hw/kdrive/src/kcmap.c @@ -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); } diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 79c007b2a4..2882b2003a 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -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);