Fixed resizing bugs for windows with WS_THICKFRAME and WS_DLGFRAME

styles.
This commit is contained in:
Abey George 1999-09-03 12:33:40 +00:00 committed by Alexandre Julliard
parent 7026a3d101
commit 48c6eb55f7
3 changed files with 7 additions and 4 deletions

View File

@ -63,7 +63,7 @@ BYTE lpGrayMask[] = { 0xAA, 0xA0,
#define HAS_THICKFRAME(style,exStyle) \
(((style) & WS_THICKFRAME) && \
!((exStyle) & WS_EX_DLGMODALFRAME))
!(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
#define HAS_THINFRAME(style) \
(((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))

View File

@ -862,7 +862,6 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
wndPtr->flags |= WIN_NEED_SIZE;
}
}
if (cs->dwExStyle & WS_EX_DLGMODALFRAME) wndPtr->dwStyle &= ~WS_THICKFRAME;
/* Get class or window DC if needed */

View File

@ -32,6 +32,10 @@
DEFAULT_DEBUG_CHANNEL(win)
/* Some useful macros */
#define HAS_DLGFRAME(style,exStyle) \
((!((style) & WS_THICKFRAME)) && (((style) & WS_DLGFRAME) || ((exStyle) & WS_EX_DLGMODALFRAME)))
/**********************************************************************/
extern Cursor X11DRV_MOUSE_XCursor; /* Current X cursor */
@ -247,7 +251,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
size_hints->win_gravity = StaticGravity;
size_hints->flags = PWinGravity;
if (cs->dwExStyle & WS_EX_DLGMODALFRAME)
if (HAS_DLGFRAME(cs->style,cs->dwExStyle))
{
size_hints->min_width = size_hints->max_width = cs->cx;
size_hints->min_height = size_hints->max_height = cs->cy;
@ -510,7 +514,7 @@ void X11DRV_WND_SetWindowPos(WND *wndPtr, const WINDOWPOS *winpos, BOOL bChangeP
/* Tweak dialog window size hints */
if ((winposPtr->flags & WIN_MANAGED) &&
(winposPtr->dwExStyle & WS_EX_DLGMODALFRAME))
HAS_DLGFRAME(winposPtr->dwStyle,winposPtr->dwExStyle))
{
XSizeHints *size_hints = TSXAllocSizeHints();