Fixed resizing bugs for windows with WS_THICKFRAME and WS_DLGFRAME
styles.
This commit is contained in:
parent
7026a3d101
commit
48c6eb55f7
|
@ -63,7 +63,7 @@ BYTE lpGrayMask[] = { 0xAA, 0xA0,
|
||||||
|
|
||||||
#define HAS_THICKFRAME(style,exStyle) \
|
#define HAS_THICKFRAME(style,exStyle) \
|
||||||
(((style) & WS_THICKFRAME) && \
|
(((style) & WS_THICKFRAME) && \
|
||||||
!((exStyle) & WS_EX_DLGMODALFRAME))
|
!(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
|
||||||
|
|
||||||
#define HAS_THINFRAME(style) \
|
#define HAS_THINFRAME(style) \
|
||||||
(((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
|
(((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;
|
wndPtr->flags |= WIN_NEED_SIZE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cs->dwExStyle & WS_EX_DLGMODALFRAME) wndPtr->dwStyle &= ~WS_THICKFRAME;
|
|
||||||
|
|
||||||
/* Get class or window DC if needed */
|
/* Get class or window DC if needed */
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
|
|
||||||
DEFAULT_DEBUG_CHANNEL(win)
|
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 */
|
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->win_gravity = StaticGravity;
|
||||||
size_hints->flags = PWinGravity;
|
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_width = size_hints->max_width = cs->cx;
|
||||||
size_hints->min_height = size_hints->max_height = cs->cy;
|
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 */
|
/* Tweak dialog window size hints */
|
||||||
|
|
||||||
if ((winposPtr->flags & WIN_MANAGED) &&
|
if ((winposPtr->flags & WIN_MANAGED) &&
|
||||||
(winposPtr->dwExStyle & WS_EX_DLGMODALFRAME))
|
HAS_DLGFRAME(winposPtr->dwStyle,winposPtr->dwExStyle))
|
||||||
{
|
{
|
||||||
XSizeHints *size_hints = TSXAllocSizeHints();
|
XSizeHints *size_hints = TSXAllocSizeHints();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue