From b0be6a88c8fecdf15176f642c0799bff99930e0d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 21 Jan 2011 08:10:52 +0000 Subject: xserver mesa xkbcomp libxcb git update 21 jan 2011 --- xorg-server/hw/xwin/wincreatewnd.c | 48 +++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'xorg-server/hw/xwin/wincreatewnd.c') 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, -- cgit v1.2.3