aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winwndproc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-11 15:36:41 +0000
committermarha <marha@users.sourceforge.net>2011-02-11 15:36:41 +0000
commit9acb2b3cd11b530debce5008074fa03587ac3331 (patch)
tree36e4ec8e5a5e49b956096ea848cddb0d872db06b /xorg-server/hw/xwin/winwndproc.c
parent65a037ffd87e7d89999a8a3d535c7a2b598b8b6c (diff)
downloadvcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.tar.gz
vcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.tar.bz2
vcxsrv-9acb2b3cd11b530debce5008074fa03587ac3331.zip
Solved display problem when multiple monitor setup changes
Diffstat (limited to 'xorg-server/hw/xwin/winwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winwndproc.c21
1 files changed, 16 insertions, 5 deletions
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);
}
}