kdrive: directly calling fbCloseScreen instead of wrapping

No need to wrap CloseScreen proc vector, we can call fbCloseScreen() from
KdCloseScreen() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-04-28 11:48:57 +02:00
parent c839203c8c
commit d04872f8c4
2 changed files with 1 additions and 13 deletions

View File

@ -559,18 +559,13 @@ KdCloseScreen(ScreenPtr pScreen)
KdScreenPriv(pScreen);
KdScreenInfo *screen = pScreenPriv->screen;
KdCardInfo *card = pScreenPriv->card;
Bool ret;
if (card->cfuncs->closeScreen)
(*card->cfuncs->closeScreen)(pScreen);
pScreenPriv->closed = TRUE;
pScreen->CloseScreen = pScreenPriv->CloseScreen;
if (pScreen->CloseScreen)
ret = (*pScreen->CloseScreen) (pScreen);
else
ret = TRUE;
Bool ret = fbCloseScreen(pScreen);
if (screen->mynum == card->selected)
KdDisableScreen(pScreen);
@ -789,12 +784,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv)
if (!(*card->cfuncs->finishInitScreen) (pScreen))
return FALSE;
/*
* Wrap CloseScreen, the order now is:
* KdCloseScreen
* fbCloseScreen
*/
pScreenPriv->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = KdCloseScreen;
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;

View File

@ -143,7 +143,6 @@ typedef struct {
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */
CreateScreenResourcesProcPtr CreateScreenResources;
CloseScreenProcPtr CloseScreen;
} KdPrivScreenRec, *KdPrivScreenPtr;
typedef enum _kdPointerState {