diff options
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r-- | xorg-server/hw/xwin/winrandr.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xwin/winwndproc.c | 21 |
2 files changed, 17 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winrandr.c b/xorg-server/hw/xwin/winrandr.c index 248404800..edc946abf 100644 --- a/xorg-server/hw/xwin/winrandr.c +++ b/xorg-server/hw/xwin/winrandr.c @@ -70,7 +70,7 @@ winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations) Why can't this be in DIX? Does union _Validate vary depending on DDX?? */ -static void +void xf86SetRootClip (ScreenPtr pScreen, Bool enable) { WindowPtr pWin = pScreen->root; diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c index 5b2a866a9..8baa25e6d 100644 --- a/xorg-server/hw/xwin/winwndproc.c +++ b/xorg-server/hw/xwin/winwndproc.c @@ -47,6 +47,9 @@ #define XKB_IN_SERVER #endif #include <xkbsrv.h> + +void xf86SetRootClip (ScreenPtr pScreen, Bool enable); + /* * Global variables */ @@ -313,11 +316,19 @@ winWindowProc (HWND hwnd, UINT message, winDebug ("winWindowProc - WM_DISPLAYCHANGE - Releasing and recreating primary surface\n"); - /* Release the old primary surface */ - (*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen); - - /* Create the new primary surface */ - (*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen); + /* Reallocate the framebuffer used by the drawing engine */ + (*s_pScreenPriv->pwinFreeFB)(s_pScreen); + if (!(*s_pScreenPriv->pwinAllocateFB)(s_pScreen)) + { + ErrorF ("winWindowProc - WM_DISPLAYCHANGE - Could not reallocate framebuffer\n"); + } + /* Update the screen pixmap to point to the new framebuffer */ + winUpdateFBPointer(s_pScreen, s_pScreenPriv->pScreenInfo->pfb); + // Restore the ability to update screen, now with new dimensions + xf86SetRootClip(s_pScreen, TRUE); + + // and arrange for it to be repainted + miPaintWindow(s_pScreen->root, &s_pScreen->root->borderClip, PW_BACKGROUND); } } |