diff options
| author | marha <marha@users.sourceforge.net> | 2011-02-11 15:36:41 +0000 | 
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2011-02-11 15:36:41 +0000 | 
| commit | 9acb2b3cd11b530debce5008074fa03587ac3331 (patch) | |
| tree | 36e4ec8e5a5e49b956096ea848cddb0d872db06b | |
| parent | 65a037ffd87e7d89999a8a3d535c7a2b598b8b6c (diff) | |
| download | vcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.tar.gz vcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.tar.bz2 vcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.zip | |
Solved display problem when multiple monitor setup changes
| -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);              }  	} | 
