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:
parent
981ee4fcf1
commit
a444407473
|
@ -27,6 +27,7 @@
|
||||||
#include "os/cmdline.h"
|
#include "os/cmdline.h"
|
||||||
#include "os/ddx_priv.h"
|
#include "os/ddx_priv.h"
|
||||||
|
|
||||||
|
#include "mi/mi_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
#include "kdrive.h"
|
#include "kdrive.h"
|
||||||
|
@ -539,18 +540,14 @@ KdCreateScreenResources(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
KdCardInfo *card = pScreenPriv->card;
|
KdCardInfo *card = pScreenPriv->card;
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
pScreen->CreateScreenResources = pScreenPriv->CreateScreenResources;
|
if (!miCreateScreenResources(pScreen))
|
||||||
if (pScreen->CreateScreenResources)
|
return FALSE;
|
||||||
ret = (*pScreen->CreateScreenResources) (pScreen);
|
|
||||||
else
|
if (card->cfuncs->createRes)
|
||||||
ret = -1;
|
return card->cfuncs->createRes(pScreen);
|
||||||
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
|
|
||||||
pScreen->CreateScreenResources = KdCreateScreenResources;
|
return TRUE;
|
||||||
if (ret && card->cfuncs->createRes)
|
|
||||||
ret = (*card->cfuncs->createRes) (pScreen);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool KdCloseScreen(ScreenPtr pScreen)
|
Bool KdCloseScreen(ScreenPtr pScreen)
|
||||||
|
@ -784,8 +781,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pScreen->CloseScreen = KdCloseScreen;
|
pScreen->CloseScreen = KdCloseScreen;
|
||||||
|
|
||||||
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
|
|
||||||
pScreen->CreateScreenResources = KdCreateScreenResources;
|
pScreen->CreateScreenResources = KdCreateScreenResources;
|
||||||
|
|
||||||
if (screen->softCursor ||
|
if (screen->softCursor ||
|
||||||
|
|
|
@ -141,8 +141,6 @@ typedef struct {
|
||||||
|
|
||||||
ColormapPtr pInstalledmap; /* current colormap */
|
ColormapPtr pInstalledmap; /* current colormap */
|
||||||
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */
|
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */
|
||||||
|
|
||||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
|
||||||
} KdPrivScreenRec, *KdPrivScreenPtr;
|
} KdPrivScreenRec, *KdPrivScreenPtr;
|
||||||
|
|
||||||
typedef enum _kdPointerState {
|
typedef enum _kdPointerState {
|
||||||
|
|
Loading…
Reference in New Issue