aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/wincreatewnd.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-21 12:52:35 +0000
committermarha <marha@users.sourceforge.net>2011-01-21 12:52:35 +0000
commit7719409ebcf17c5288114dee8f60cc9ff889fd3e (patch)
treee86379743c048712c638bed954264fccea7798c4 /xorg-server/hw/xwin/wincreatewnd.c
parent26ee05a8febfe1ed6da852777a8c1c2a37e4cf9b (diff)
parentb0be6a88c8fecdf15176f642c0799bff99930e0d (diff)
downloadvcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.tar.gz
vcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.tar.bz2
vcxsrv-7719409ebcf17c5288114dee8f60cc9ff889fd3e.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xwin/wincreatewnd.c')
-rw-r--r--xorg-server/hw/xwin/wincreatewnd.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/xorg-server/hw/xwin/wincreatewnd.c b/xorg-server/hw/xwin/wincreatewnd.c
index b684922aa..91dfb4abf 100644
--- a/xorg-server/hw/xwin/wincreatewnd.c
+++ b/xorg-server/hw/xwin/wincreatewnd.c
@@ -194,7 +194,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
fForceShowWindow = TRUE;
}
dwWindowStyle |= WS_CAPTION;
- if (pScreenInfo->fScrollbars)
+ if (pScreenInfo->iResizeMode != notAllowed)
dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX;
}
else
@@ -235,6 +235,22 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
iPosY = rcWorkArea.top;
}
+ /* Clean up the scrollbars flag, if necessary */
+ if ((!pScreenInfo->fDecoration
+#ifdef XWIN_MULTIWINDOWEXTWM
+ || pScreenInfo->fMWExtWM
+#endif
+ || pScreenInfo->fRootless
+#ifdef XWIN_MULTIWINDOW
+ || pScreenInfo->fMultiWindow
+#endif
+ )
+ && (pScreenInfo->iResizeMode == resizeWithScrollbars))
+ {
+ /* We cannot have scrollbars if we do not have a window border */
+ pScreenInfo->iResizeMode = notAllowed;
+ }
+
/* Did the user specify a height and width? */
if (pScreenInfo->fUserGaveHeightAndWidth)
{
@@ -254,11 +270,11 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
)
{
winDebug ("winCreateBoundingWindowWindowed - Window has decoration\n");
- /* Are we using scrollbars? */
- if (pScreenInfo->fScrollbars)
+
+ /* Are we resizable */
+ if (pScreenInfo->iResizeMode != notAllowed)
{
- winDebug ("winCreateBoundingWindowWindowed - Window has "
- "scrollbars\n");
+ winDebug ("winCreateBoundingWindowWindowed - Window is resizable\n");
iWidth += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
iHeight += 2 * GetSystemMetrics (SM_CYSIZEFRAME)
@@ -266,8 +282,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
}
else
{
- winDebug ("winCreateBoundingWindowWindowed - Window does not have "
- "scrollbars\n");
+ winDebug ("winCreateBoundingWindowWindowed - Window is not resizable\n");
iWidth += 2 * GetSystemMetrics (SM_CXFIXEDFRAME);
iHeight += 2 * GetSystemMetrics (SM_CYFIXEDFRAME)
@@ -288,22 +303,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
}
}
- /* Clean up the scrollbars flag, if necessary */
- if ((!pScreenInfo->fDecoration
-#ifdef XWIN_MULTIWINDOWEXTWM
- || pScreenInfo->fMWExtWM
-#endif
- || pScreenInfo->fRootless
-#ifdef XWIN_MULTIWINDOW
- || pScreenInfo->fMultiWindow
-#endif
- )
- && pScreenInfo->fScrollbars)
- {
- /* We cannot have scrollbars if we do not have a window border */
- pScreenInfo->fScrollbars = FALSE;
- }
-
+ /* Make sure window is no bigger than work area */
if (TRUE
#ifdef XWIN_MULTIWINDOWEXTWM
&& !pScreenInfo->fMWExtWM
@@ -389,7 +389,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
rcClient.bottom, rcClient.top);
/* We adjust the visual size if the user did not specify it */
- if (!(pScreenInfo->fScrollbars && pScreenInfo->fUserGaveHeightAndWidth))
+ if (!((pScreenInfo->iResizeMode == resizeWithScrollbars) && pScreenInfo->fUserGaveHeightAndWidth))
{
/*
* User did not give a height and width with scrollbars enabled,