Commit 6f2c1860 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Hide window icons in desktop mode when the taskbar is active.

parent 9da34d94
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment