xfree86/xv: Provide a ModeSet hook
Reput all ports when the display mode or panning has been changed by RandR code. This makes the overlays appear in the correct position on the screen. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
This commit is contained in:
parent
640c8716e0
commit
f4f41c812d
|
@ -104,6 +104,7 @@ static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy);
|
||||||
static Bool xf86XVEnterVT(int, int);
|
static Bool xf86XVEnterVT(int, int);
|
||||||
static void xf86XVLeaveVT(int, int);
|
static void xf86XVLeaveVT(int, int);
|
||||||
static void xf86XVAdjustFrame(int index, int x, int y, int flags);
|
static void xf86XVAdjustFrame(int index, int x, int y, int flags);
|
||||||
|
static void xf86XVModeSet(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
/* misc */
|
/* misc */
|
||||||
|
|
||||||
|
@ -287,6 +288,7 @@ xf86XVScreenInit(
|
||||||
ScreenPriv->EnterVT = pScrn->EnterVT;
|
ScreenPriv->EnterVT = pScrn->EnterVT;
|
||||||
ScreenPriv->LeaveVT = pScrn->LeaveVT;
|
ScreenPriv->LeaveVT = pScrn->LeaveVT;
|
||||||
ScreenPriv->AdjustFrame = pScrn->AdjustFrame;
|
ScreenPriv->AdjustFrame = pScrn->AdjustFrame;
|
||||||
|
ScreenPriv->ModeSet = pScrn->ModeSet;
|
||||||
|
|
||||||
pScreen->DestroyWindow = xf86XVDestroyWindow;
|
pScreen->DestroyWindow = xf86XVDestroyWindow;
|
||||||
pScreen->WindowExposures = xf86XVWindowExposures;
|
pScreen->WindowExposures = xf86XVWindowExposures;
|
||||||
|
@ -295,6 +297,7 @@ xf86XVScreenInit(
|
||||||
pScrn->LeaveVT = xf86XVLeaveVT;
|
pScrn->LeaveVT = xf86XVLeaveVT;
|
||||||
if(pScrn->AdjustFrame)
|
if(pScrn->AdjustFrame)
|
||||||
pScrn->AdjustFrame = xf86XVAdjustFrame;
|
pScrn->AdjustFrame = xf86XVAdjustFrame;
|
||||||
|
pScrn->ModeSet = xf86XVModeSet;
|
||||||
|
|
||||||
if(!xf86XVInitAdaptors(pScreen, adaptors, num))
|
if(!xf86XVInitAdaptors(pScreen, adaptors, num))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1241,6 +1244,7 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen)
|
||||||
pScrn->EnterVT = ScreenPriv->EnterVT;
|
pScrn->EnterVT = ScreenPriv->EnterVT;
|
||||||
pScrn->LeaveVT = ScreenPriv->LeaveVT;
|
pScrn->LeaveVT = ScreenPriv->LeaveVT;
|
||||||
pScrn->AdjustFrame = ScreenPriv->AdjustFrame;
|
pScrn->AdjustFrame = ScreenPriv->AdjustFrame;
|
||||||
|
pScrn->ModeSet = ScreenPriv->ModeSet;
|
||||||
|
|
||||||
for(c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
for(c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) {
|
||||||
xf86XVFreeAdaptor(pa);
|
xf86XVFreeAdaptor(pa);
|
||||||
|
@ -1344,6 +1348,26 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
|
||||||
xf86XVReputOrStopAllPorts(pScrn);
|
xf86XVReputOrStopAllPorts(pScrn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86XVModeSet(ScrnInfoPtr pScrn)
|
||||||
|
{
|
||||||
|
ScreenPtr pScreen = pScrn->pScreen;
|
||||||
|
XF86XVScreenPtr ScreenPriv;
|
||||||
|
|
||||||
|
/* Can be called before pScrn->pScreen is set */
|
||||||
|
if (!pScreen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ScreenPriv = GET_XF86XV_SCREEN(pScreen);
|
||||||
|
|
||||||
|
if (ScreenPriv->ModeSet) {
|
||||||
|
pScrn->ModeSet = ScreenPriv->ModeSet;
|
||||||
|
(*pScrn->ModeSet)(pScrn);
|
||||||
|
pScrn->ModeSet = xf86XVModeSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
xf86XVReputOrStopAllPorts(pScrn);
|
||||||
|
}
|
||||||
|
|
||||||
/**** XvAdaptorRec fields ****/
|
/**** XvAdaptorRec fields ****/
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ typedef struct {
|
||||||
Bool (*EnterVT)(int, int);
|
Bool (*EnterVT)(int, int);
|
||||||
void (*LeaveVT)(int, int);
|
void (*LeaveVT)(int, int);
|
||||||
GCPtr videoGC;
|
GCPtr videoGC;
|
||||||
|
xf86ModeSetProc *ModeSet;
|
||||||
} XF86XVScreenRec, *XF86XVScreenPtr;
|
} XF86XVScreenRec, *XF86XVScreenPtr;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in New Issue