Fixed inconsistency in conditions that determines if a window requires
a WM border.
This commit is contained in:
parent
28896ee7bf
commit
00bf3811ae
|
@ -226,4 +226,8 @@ extern LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
|||
extern LRESULT WINAPI ListBoxWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
extern LRESULT WINAPI ComboLBWndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
/* generic method that returns TRUE if the window properties ask for a
|
||||
window manager type of border */
|
||||
extern BOOL WIN_WindowNeedsWMBorder( DWORD style, DWORD exStyle );
|
||||
|
||||
#endif /* __WINE_WIN_H */
|
||||
|
|
|
@ -74,6 +74,21 @@ static HBITMAP16 hbitmapRestoreD = 0;
|
|||
#define ON_BOTTOM_BORDER(hit) \
|
||||
(((hit) == HTBOTTOM) || ((hit) == HTBOTTOMLEFT) || ((hit) == HTBOTTOMRIGHT))
|
||||
|
||||
/***********************************************************************
|
||||
* WIN_WindowNeedsWMBorder
|
||||
*
|
||||
* This method defines the rules for a window to have a WM border,
|
||||
* caption... It is used for consitency purposes.
|
||||
*/
|
||||
BOOL WIN_WindowNeedsWMBorder( DWORD style, DWORD exStyle )
|
||||
{
|
||||
if (!(style & WS_CHILD) && Options.managed &&
|
||||
(((style & WS_CAPTION) == WS_CAPTION) ||
|
||||
(style & WS_THICKFRAME) ||
|
||||
(exStyle & WS_EX_DLGMODALFRAME))) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NC_AdjustRect
|
||||
*
|
||||
|
@ -88,9 +103,7 @@ static void NC_AdjustRect( LPRECT16 rect, DWORD style, BOOL menu,
|
|||
|
||||
if(style & WS_ICONIC) return;
|
||||
/* Decide if the window will be managed (see CreateWindowEx) */
|
||||
if (!(Options.managed && !(style & WS_CHILD) &&
|
||||
((style & (WS_DLGFRAME | WS_THICKFRAME)) ||
|
||||
(exStyle & WS_EX_DLGMODALFRAME))))
|
||||
if (!WIN_WindowNeedsWMBorder(style, exStyle))
|
||||
{
|
||||
if (HAS_THICKFRAME( style, exStyle ))
|
||||
InflateRect16( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
|
||||
|
@ -156,9 +169,7 @@ NC_AdjustRectOuter95 (LPRECT16 rect, DWORD style, BOOL menu, DWORD exStyle)
|
|||
if(style & WS_ICONIC) return;
|
||||
|
||||
/* Decide if the window will be managed (see CreateWindowEx) */
|
||||
if (!(Options.managed && !(style & WS_CHILD) &&
|
||||
((style & (WS_DLGFRAME | WS_THICKFRAME)) ||
|
||||
(exStyle & WS_EX_DLGMODALFRAME))))
|
||||
if (!WIN_WindowNeedsWMBorder(style, exStyle))
|
||||
{
|
||||
if (HAS_THICKFRAME( style, exStyle ))
|
||||
InflateRect16( rect, GetSystemMetrics(SM_CXFRAME), GetSystemMetrics(SM_CYFRAME) );
|
||||
|
|
|
@ -188,9 +188,7 @@ BOOL X11DRV_WND_CreateWindow(WND *wndPtr, CLASS *classPtr, CREATESTRUCTA *cs, BO
|
|||
|
||||
/* Create "managed" windows only if a title bar or resizable */
|
||||
/* frame is required. */
|
||||
if (Options.managed && ( ((cs->style & WS_CAPTION) == WS_CAPTION) ||
|
||||
(cs->style & WS_THICKFRAME) ||
|
||||
(cs->dwExStyle & WS_EX_DLGMODALFRAME)))
|
||||
if (WIN_WindowNeedsWMBorder(cs->style, cs->dwExStyle))
|
||||
{
|
||||
win_attr.event_mask = ExposureMask | KeyPressMask |
|
||||
KeyReleaseMask | PointerMotionMask |
|
||||
|
|
Loading…
Reference in New Issue