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/composite/compwindow.c b/composite/compwindow.c index 5792367..bed827a 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -203,6 +203,7 @@ compPositionWindow (WindowPtr pWin, int x, int y) cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; compCheckTree (pWin->drawable.pScreen); + updateOverlayWindow(pScreen); return ret; }