From 15c0bcb3d8eff7c38def24b58633bb1d6116d8c4 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 16 Apr 2008 16:50:29 +0900 Subject: [PATCH] winex11.drv: Map zero-sized windows but don't add WM decoration to them. --- dlls/winex11.drv/window.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ab63f3b0da..e0e8ea154a 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -113,9 +113,6 @@ BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) */ BOOL X11DRV_is_window_rect_mapped( const RECT *rect ) { - /* don't map if rect is empty */ - if (IsRectEmpty( rect )) return FALSE; - /* don't map if rect is off-screen */ if (rect->left >= virtual_screen_rect.right || rect->top >= virtual_screen_rect.bottom || @@ -144,11 +141,14 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl /*********************************************************************** * get_mwm_decorations */ -static unsigned long get_mwm_decorations( DWORD style, DWORD ex_style ) +static unsigned long get_mwm_decorations( struct x11drv_win_data *data, + DWORD style, DWORD ex_style ) { unsigned long ret = 0; - if (!decorated_mode) return ret; + if (!decorated_mode) return 0; + + if (IsRectEmpty( &data->window_rect )) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -180,7 +180,7 @@ static void get_x11_rect_offset( struct x11drv_win_data *data, RECT *rect ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - decor = get_mwm_decorations( style, ex_style ); + decor = get_mwm_decorations( data, style, ex_style ); if (decor & MWM_DECOR_TITLE) style_mask |= WS_CAPTION; if (decor & MWM_DECOR_BORDER) @@ -876,7 +876,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - mwm_hints.decorations = get_mwm_decorations( style, ex_style ); + mwm_hints.decorations = get_mwm_decorations( data, style, ex_style ); mwm_hints.functions = MWM_FUNC_MOVE; if (is_window_resizable( data, style )) mwm_hints.functions |= MWM_FUNC_RESIZE; if (style & WS_MINIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MINIMIZE; -- 2.32.0.93.g670b81a890