Compare commits
3 Commits
master
...
submit/kdr
Author | SHA1 | Date | |
---|---|---|---|
|
48131271ec | ||
|
b17cfde146 | ||
|
31c4129f53 |
|
@ -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,38 +540,28 @@ 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
Bool KdCloseScreen(ScreenPtr pScreen)
|
||||||
KdCloseScreen(ScreenPtr pScreen)
|
|
||||||
{
|
{
|
||||||
KdScreenPriv(pScreen);
|
KdScreenPriv(pScreen);
|
||||||
KdScreenInfo *screen = pScreenPriv->screen;
|
KdScreenInfo *screen = pScreenPriv->screen;
|
||||||
KdCardInfo *card = pScreenPriv->card;
|
KdCardInfo *card = pScreenPriv->card;
|
||||||
Bool ret;
|
|
||||||
|
|
||||||
if (card->cfuncs->closeScreen)
|
if (card->cfuncs->closeScreen)
|
||||||
(*card->cfuncs->closeScreen)(pScreen);
|
(*card->cfuncs->closeScreen)(pScreen);
|
||||||
|
|
||||||
pScreenPriv->closed = TRUE;
|
pScreenPriv->closed = TRUE;
|
||||||
pScreen->CloseScreen = pScreenPriv->CloseScreen;
|
|
||||||
|
|
||||||
if (pScreen->CloseScreen)
|
Bool ret = fbCloseScreen(pScreen);
|
||||||
ret = (*pScreen->CloseScreen) (pScreen);
|
|
||||||
else
|
|
||||||
ret = TRUE;
|
|
||||||
|
|
||||||
if (screen->mynum == card->selected)
|
if (screen->mynum == card->selected)
|
||||||
KdDisableScreen(pScreen);
|
KdDisableScreen(pScreen);
|
||||||
|
@ -789,15 +780,7 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||||
if (!(*card->cfuncs->finishInitScreen) (pScreen))
|
if (!(*card->cfuncs->finishInitScreen) (pScreen))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/*
|
|
||||||
* Wrap CloseScreen, the order now is:
|
|
||||||
* KdCloseScreen
|
|
||||||
* fbCloseScreen
|
|
||||||
*/
|
|
||||||
pScreenPriv->CloseScreen = pScreen->CloseScreen;
|
|
||||||
pScreen->CloseScreen = KdCloseScreen;
|
pScreen->CloseScreen = KdCloseScreen;
|
||||||
|
|
||||||
pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources;
|
|
||||||
pScreen->CreateScreenResources = KdCreateScreenResources;
|
pScreen->CreateScreenResources = KdCreateScreenResources;
|
||||||
|
|
||||||
if (screen->softCursor ||
|
if (screen->softCursor ||
|
||||||
|
|
|
@ -141,9 +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;
|
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
} KdPrivScreenRec, *KdPrivScreenPtr;
|
} KdPrivScreenRec, *KdPrivScreenPtr;
|
||||||
|
|
||||||
typedef enum _kdPointerState {
|
typedef enum _kdPointerState {
|
||||||
|
@ -435,4 +432,6 @@ void
|
||||||
void
|
void
|
||||||
InitCard(char *name);
|
InitCard(char *name);
|
||||||
|
|
||||||
|
Bool KdCloseScreen(ScreenPtr pScreen);
|
||||||
|
|
||||||
#endif /* _KDRIVE_H_ */
|
#endif /* _KDRIVE_H_ */
|
||||||
|
|
|
@ -142,13 +142,13 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num)
|
||||||
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
ScreenPriv->DestroyWindow = pScreen->DestroyWindow;
|
||||||
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
ScreenPriv->WindowExposures = pScreen->WindowExposures;
|
||||||
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
ScreenPriv->ClipNotify = pScreen->ClipNotify;
|
||||||
ScreenPriv->CloseScreen = pScreen->CloseScreen;
|
|
||||||
|
|
||||||
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
/* fprintf(stderr,"XV: Wrapping screen funcs\n"); */
|
||||||
|
|
||||||
pScreen->DestroyWindow = KdXVDestroyWindow;
|
pScreen->DestroyWindow = KdXVDestroyWindow;
|
||||||
pScreen->WindowExposures = KdXVWindowExposures;
|
pScreen->WindowExposures = KdXVWindowExposures;
|
||||||
pScreen->ClipNotify = KdXVClipNotify;
|
pScreen->ClipNotify = KdXVClipNotify;
|
||||||
|
/* it will call KdCloseScreen() as it's the last act */
|
||||||
pScreen->CloseScreen = KdXVCloseScreen;
|
pScreen->CloseScreen = KdXVCloseScreen;
|
||||||
|
|
||||||
if (!KdXVInitAdaptors(pScreen, adaptors, num))
|
if (!KdXVInitAdaptors(pScreen, adaptors, num))
|
||||||
|
@ -922,9 +922,6 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
pScreen->DestroyWindow = ScreenPriv->DestroyWindow;
|
||||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||||
pScreen->ClipNotify = ScreenPriv->ClipNotify;
|
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++) {
|
for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
||||||
KdXVFreeAdaptor(pa);
|
KdXVFreeAdaptor(pa);
|
||||||
|
@ -933,7 +930,7 @@ KdXVCloseScreen(ScreenPtr pScreen)
|
||||||
free(pxvs->pAdaptors);
|
free(pxvs->pAdaptors);
|
||||||
free(ScreenPriv);
|
free(ScreenPriv);
|
||||||
|
|
||||||
return pScreen->CloseScreen(pScreen);
|
return KdCloseScreen(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**** XvAdaptorRec fields ****/
|
/**** XvAdaptorRec fields ****/
|
||||||
|
|
|
@ -154,7 +154,6 @@ typedef struct {
|
||||||
DestroyWindowProcPtr DestroyWindow;
|
DestroyWindowProcPtr DestroyWindow;
|
||||||
ClipNotifyProcPtr ClipNotify;
|
ClipNotifyProcPtr ClipNotify;
|
||||||
WindowExposuresProcPtr WindowExposures;
|
WindowExposuresProcPtr WindowExposures;
|
||||||
CloseScreenProcPtr CloseScreen;
|
|
||||||
} KdXVScreenRec, *KdXVScreenPtr;
|
} KdXVScreenRec, *KdXVScreenPtr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue