Alexandre Julliard : winex11: Hide window icons in desktop mode when the taskbar is active.
Alexandre Julliard
julliard at winehq.org
Tue May 31 10:42:52 CDT 2016
Module: wine
Branch: master
Commit: 6f2c18609b27a4fe80f3e538e2454579d8d6b3aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f2c18609b27a4fe80f3e538e2454579d8d6b3aa
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 31 22:41:37 2016 +0900
winex11: Hide window icons in desktop mode when the taskbar is active.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winex11.drv/window.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 59affca..06ce26e 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -2404,6 +2404,16 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
release_win_data( data );
}
+/* check if the window icon should be hidden (i.e. moved off-screen) */
+static BOOL hide_icon( struct x11drv_win_data *data )
+{
+ static const WCHAR trayW[] = {'S','h','e','l','l','_','T','r','a','y','W','n','d',0};
+
+ if (data->managed) return TRUE;
+ /* hide icons in desktop mode when the taskbar is active */
+ if (root_window == DefaultRootWindow( gdi_display )) return FALSE;
+ return IsWindowVisible( FindWindowW( trayW, NULL ));
+}
/***********************************************************************
* ShowWindow (X11DRV.@)
@@ -2418,18 +2428,18 @@ UINT CDECL X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
struct x11drv_thread_data *thread_data = x11drv_thread_data();
struct x11drv_win_data *data = get_win_data( hwnd );
- if (!data || !data->whole_window || !data->managed) goto done;
+ if (!data || !data->whole_window) goto done;
if (IsRectEmpty( rect )) goto done;
if (style & WS_MINIMIZE)
{
- if (rect->left != -32000 || rect->top != -32000)
+ if (((rect->left != -32000 || rect->top != -32000)) && hide_icon( data ))
{
OffsetRect( rect, -32000 - rect->left, -32000 - rect->top );
swp &= ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
}
goto done;
}
- if (!data->mapped || data->iconic) goto done;
+ if (!data->managed || !data->mapped || data->iconic) goto done;
/* only fetch the new rectangle if the ShowWindow was a result of a window manager event */
More information about the wine-cvs
mailing list