From: novenary streetwalkermc@gmail.com
A window is withdrawn when neither it nor its "taskbar" icon is visible, e.g. when switching workspaces.
This fixes issues with unmanaged popups showing on all workspaces. --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/window.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 19126cecaf8..93a78151d92 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1342,7 +1342,7 @@ static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL updat TRACE( "not restoring win %p/%lx style %08x\n", data->hwnd, data->whole_window, style ); } } - else if (!data->iconic && data->wm_state == IconicState) + else if (!data->iconic && (data->wm_state == IconicState || data->wm_state == WithdrawnState)) { data->iconic = TRUE; if ((style & WS_MINIMIZEBOX) && !(style & WS_DISABLED)) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index cb9e07599c4..fcbdad97d16 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2721,7 +2721,10 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, data->iconic = (new_style & WS_MINIMIZE) != 0; TRACE( "changing win %p iconic state to %u\n", data->hwnd, data->iconic ); if (data->iconic) - XIconifyWindow( data->display, data->whole_window, data->vis.screen ); + { + if (data->wm_state != WithdrawnState) + XIconifyWindow( data->display, data->whole_window, data->vis.screen ); + } else if (is_window_rect_mapped( rectWindow )) XMapWindow( data->display, data->whole_window ); update_net_wm_states( data );