Compare commits
3 Commits
master
...
submit/kdr
Author | SHA1 | Date | |
---|---|---|---|
|
48131271ec | ||
|
b17cfde146 | ||
|
31c4129f53 |
|
@ -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,38 +540,28 @@ 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;
|
||||
}
|
||||
|
||||
static Bool
|
||||
KdCloseScreen(ScreenPtr pScreen)
|
||||
Bool 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,15 +780,7 @@ 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;
|
||||
pScreen->CreateScreenResources = KdCreateScreenResources;
|
||||
|
||||
if (screen->softCursor ||
|
||||
|
|
|
@ -141,9 +141,6 @@ typedef struct {
|
|||
|
||||
ColormapPtr pInstalledmap; /* current colormap */
|
||||
xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */
|
||||
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
} KdPrivScreenRec, *KdPrivScreenPtr;
|
||||
|
||||
typedef enum _kdPointerState {
|
||||
|
@ -435,4 +432,6 @@ void
|
|||
void
|
||||
InitCard(char *name);
|
||||
|
||||
Bool KdCloseScreen(ScreenPtr pScreen);
|
||||
|
||||
#endif /* _KDRIVE_H_ */
|
||||
|
|
|
@ -142,13 +142,13 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
|||
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
||||
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
||||
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
||||
ScreenPriv->CloseScreen = pScreen->CloseScreen;
|
||||
|
||||
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
||||
|
||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
||||
pScreen->WindowExposures = KdXVWindowExposures;
|
||||
pScreen->ClipNotify = KdXVClipNotify;
|
||||
/* it will call KdCloseScreen() as it's the last act */
|
||||
pScreen->CloseScreen = KdXVCloseScreen;
|
||||
|
||||
if (!KdXVInitAdaptors(pScreen, adaptors, num))
|
||||
|
@ -922,9 +922,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
|||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
||||
pScreen->CloseScreen = ScreenPriv->CloseScreen;
|
||||
|
||||
/* fprintf(stderr,"XV: Unwrapping screen funcs\n"); */
|
||||
|
||||
for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
||||
KdXVFreeAdaptor(pa);
|
||||
|
@ -933,7 +930,7 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
|||
free(pxvs->pAdaptors);
|
||||
free(ScreenPriv);
|
||||
|
||||
return pScreen->CloseScreen(pScreen);
|
||||
return KdCloseScreen(pScreen);
|
||||
}
|
||||
|
||||
/**** XvAdaptorRec fields ****/
|
||||
|
|
|
@ -154,7 +154,6 @@ typedef struct {
|
|||
DestroyWindowProcPtr DestroyWindow;
|
||||
ClipNotifyProcPtr ClipNotify;
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
} KdXVScreenRec, *KdXVScreenPtr;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in New Issue