diff --git a/composite/compext.c b/composite/compext.c index 2918556..8dcade2 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -429,6 +429,29 @@ createOverlayWindow (ScreenPtr pScreen) return pWin; } +int +updateOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs; + WindowPtr pWin; /* overlay window */ + XID vlist[2]; + + cs = GetCompScreen(pScreen); + if ((pWin = cs->pOverlayWin) != NULL) { + if ((pWin->drawable.width == pScreen->width) && + (pWin->drawable.height == pScreen->height)) + return Success; + + /* Let's resize the overlay window. */ + vlist[0] = pScreen->width; + vlist[1] = pScreen->height; + return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); + } + + /* Let's be on the safe side and not assume an overlay window is always allocated. */ + return Success; +} + static int ProcCompositeGetOverlayWindow (ClientPtr client) { diff --git a/composite/compint.h b/composite/compint.h index 4b0fe08..bc3c618 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -301,4 +301,7 @@ CompositeRealChildHead (WindowPtr pWin); int DeleteWindowNoInputDevices(pointer value, XID wid); +int +updateOverlayWindow(ScreenPtr pScreen); + #endif /* _COMPINT_H_ */ diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index e2668fb..d6a2cc0 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -239,6 +239,9 @@ xf86RandR12SetMode (ScreenPtr pScreen, */ xf86SetViewport (pScreen, pScreen->width, pScreen->height); xf86SetViewport (pScreen, 0, 0); +#ifdef COMPOSITE + updateOverlayWindow(pScreen); +#endif /* COMPOSITE */ if (pRoot) (*scrp->EnableDisableFBAccess) (pScreen->myNum, TRUE); return ret; diff --git a/include/window.h b/include/window.h index 52b3982..dc574e2 100644 --- a/include/window.h +++ b/include/window.h @@ -256,4 +256,8 @@ extern void DisableMapUnmapEvents( extern void EnableMapUnmapEvents( WindowPtr /* pWin */ ); +#ifdef COMPOSITE /* Is this the appropriate place? */ +extern int updateOverlayWindow(ScreenPtr pScreen); +#endif /* COMPOSITE */ + #endif /* WINDOW_H */