Commit 48c6eb55 authored by Abey George's avatar Abey George Committed by Alexandre Julliard

Fixed resizing bugs for windows with WS_THICKFRAME and WS_DLGFRAME

styles.
parent 7026a3d1
......@@ -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)))
......
......@@ -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 */
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment