aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/wincreatewnd.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
committermarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
commitb0be6a88c8fecdf15176f642c0799bff99930e0d (patch)
treeec9fea5c77c9d705757c0533beb059c467a16393 /xorg-server/hw/xwin/wincreatewnd.c
parentb582c2f2afd66e3afa0d143923e8b71985e39a6c (diff)
downloadvcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.gz
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.bz2
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.zip
xserver mesa xkbcomp libxcb git update 21 jan 2011
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 0c342e1ae..755373965 100644
--- a/xorg-server/hw/xwin/wincreatewnd.c
+++ b/xorg-server/hw/xwin/wincreatewnd.c
@@ -192,7 +192,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
fForceShowWindow = TRUE;
}
dwWindowStyle |= WS_CAPTION;
- if (pScreenInfo->fScrollbars)
+ if (pScreenInfo->iResizeMode != notAllowed)
dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX;
}
else
@@ -233,6 +233,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)
{
@@ -256,12 +272,12 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
#if CYGDEBUG
winDebug ("winCreateBoundingWindowWindowed - Window has decoration\n");
#endif
- /* Are we using scrollbars? */
- if (pScreenInfo->fScrollbars)
+
+ /* Are we resizable */
+ if (pScreenInfo->iResizeMode != notAllowed)
{
#if CYGDEBUG
- winDebug ("winCreateBoundingWindowWindowed - Window has "
- "scrollbars\n");
+ winDebug ("winCreateBoundingWindowWindowed - Window is resizable\n");
#endif
iWidth += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
@@ -271,8 +287,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
else
{
#if CYGDEBUG
- winDebug ("winCreateBoundingWindowWindowed - Window does not have "
- "scrollbars\n");
+ winDebug ("winCreateBoundingWindowWindowed - Window is not resizable\n");
#endif
iWidth += 2 * GetSystemMetrics (SM_CXFIXEDFRAME);
@@ -296,22 +311,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
@@ -396,7 +396,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,