From: Jactry Zeng jzeng@codeweavers.com
--- dlls/winex11.drv/window.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index d109d6a744e..6628e42e2e3 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -432,7 +432,7 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl /*********************************************************************** * get_mwm_decorations */ -static unsigned long get_mwm_decorations_for_style( DWORD style, DWORD ex_style ) +static unsigned long get_mwm_decorations_for_style( struct x11drv_win_data *data, DWORD style, DWORD ex_style ) { unsigned long ret = 0;
@@ -441,6 +441,9 @@ static unsigned long get_mwm_decorations_for_style( DWORD style, DWORD ex_style
if ((style & WS_CAPTION) == WS_CAPTION) { + if (data && ((data->rects.client.top - data->rects.window.top) < NtUserGetSystemMetrics(SM_CYCAPTION))) + return 0; + ret |= MWM_DECOR_TITLE | MWM_DECOR_BORDER; if (style & WS_SYSMENU) ret |= MWM_DECOR_MENU; if (style & WS_MINIMIZEBOX) ret |= MWM_DECOR_MINIMIZE; @@ -459,7 +462,7 @@ static unsigned long get_mwm_decorations_for_style( DWORD style, DWORD ex_style static unsigned long get_mwm_decorations( struct x11drv_win_data *data, DWORD style, DWORD ex_style ) { if (EqualRect( &data->rects.window, &data->rects.visible )) return 0; - return get_mwm_decorations_for_style( style, ex_style ); + return get_mwm_decorations_for_style( data, style, ex_style ); }
@@ -2900,10 +2903,13 @@ void X11DRV_MoveWindowBits( HWND hwnd, const struct window_rects *old_rects, */ BOOL X11DRV_GetWindowStyleMasks( HWND hwnd, UINT style, UINT ex_style, UINT *style_mask, UINT *ex_style_mask ) { - unsigned long decor = get_mwm_decorations_for_style( style, ex_style ); struct x11drv_win_data *data; + unsigned long decor;
- if ((data = get_win_data( hwnd ))) + data = get_win_data( hwnd ); + decor = get_mwm_decorations_for_style( data, style, ex_style ); + + if (data) { if (!data->managed) decor = 0; release_win_data( data );