kdrive: call miCreateScreenResources() drectly

No need for complicated wrapping/unwrapping: it's always just
miCreateResources() anyway - so we can call it directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-02 15:04:59 +02:00
parent 981ee4fcf1
commit a444407473
2 changed files with 8 additions and 15 deletions

View File

@ -27,6 +27,7 @@
#include "os/cmdline.h"
#include "os/ddx_priv.h"
#include "mi/mi_priv.h"
#include "os/osdep.h"
#include "kdrive.h"
@ -539,18 +540,14 @@ KdCreateScreenResources(ScreenPtr pScreen)
{
KdScreenPriv(pScreen);
KdCardInfo *card = pScreenPriv->card;
Bool ret;
pScreen->CreateScreenResources = pScreenPriv->CreateScreenResources;
if (pScreen->CreateScreenResources)
ret = (*pScreen->CreateScreenResources) (pScreen);
else
ret = -1;
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = KdCreateScreenResources;
if (ret && card->cfuncs->createRes)
ret = (*card->cfuncs->createRes) (pScreen);
return ret;
if (!miCreateScreenResources(pScreen))
return FALSE;
if (card->cfuncs->createRes)
return card->cfuncs->createRes(pScreen);
return TRUE;
}
Bool KdCloseScreen(ScreenPtr pScreen)
@ -784,8 +781,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv)
return FALSE;
pScreen->CloseScreen = KdCloseScreen;
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = KdCreateScreenResources;
if (screen->softCursor ||

View File

@ -141,8 +141,6 @@ typedef struct {
ColormapPtr pInstalledmap; /* current colormap */
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */
CreateScreenResourcesProcPtr CreateScreenResources;
} KdPrivScreenRec, *KdPrivScreenPtr;
typedef enum _kdPointerState {