[PATCH 08/13] Cygwin/X: When the style changes, adjust the window size so the client area remains the same.
Jon TURNEY
jon.turney at dronecode.org.uk
Wed Jan 7 12:04:03 PST 2009
When the style changes, adjust the window size so the client area remains the same.
Otherwise the window size may change when sizing is reflected from
Windows to X, and some windows are drawn expecting them to be exactly the reqeusted size
(e.g. gmplayer control window)
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
hw/xwin/winmultiwindowwndproc.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index df0f856..6254488 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -1038,6 +1038,17 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
winAdjustXWindow (pWin, hwnd);
return 0; /* end of WM_SIZE handler */
+ case WM_STYLECHANGED:
+ /* when the style changes, adjust the window size so the client area remains the same */
+ {
+ LONG x,y;
+ DrawablePtr pDraw = &pWin->drawable;
+ x = pDraw->x - wBorderWidth(pWin);
+ y = pDraw->y - wBorderWidth(pWin);
+ winPositionWindowMultiWindow(pWin, x, y);
+ }
+ return 0;
+
case WM_MOUSEACTIVATE:
/* Check if this window needs to be made active when clicked */
--
1.6.0.4
More information about the xorg
mailing list