From 0bc93684f011d35fa63cdc126f938fa4adac7452 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 15 Oct 2012 16:17:22 +0200 Subject: [PATCH] winex11: Move the icon window off-screen for managed windows. --- dlls/user32/tests/msg.c | 5 ----- dlls/winex11.drv/window.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 7d14b126286..bfc3830d236 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11031,11 +11031,6 @@ static void test_ShowWindow(void) } else { - if (wp.ptMinPosition.x != sw[i].wp_min.x || wp.ptMinPosition.y != sw[i].wp_min.y) - todo_wine - ok(wp.ptMinPosition.x == sw[i].wp_min.x && wp.ptMinPosition.y == sw[i].wp_min.y, - "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y); - else ok(wp.ptMinPosition.x == sw[i].wp_min.x && wp.ptMinPosition.y == sw[i].wp_min.y, "expected %d,%d got %d,%d\n", sw[i].wp_min.x, sw[i].wp_min.y, wp.ptMinPosition.x, wp.ptMinPosition.y); } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f5f7af5349e..8b76441e501 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2175,7 +2175,7 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags if (data->mapped && event_type != ReparentNotify) { if (((swp_flags & SWP_HIDEWINDOW) && !(new_style & WS_VISIBLE)) || - (!event_type && + (!event_type && !(new_style & WS_MINIMIZE) && !is_window_rect_mapped( rectWindow ) && is_window_rect_mapped( &old_window_rect ))) { release_win_data( data ); @@ -2241,9 +2241,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 || !data->mapped || data->iconic) goto done; - if (style & WS_MINIMIZE) goto done; + if (!data || !data->whole_window || !data->managed) goto done; if (IsRectEmpty( rect )) goto done; + if (style & WS_MINIMIZE) + { + if (rect->left != -32000 || rect->top != -32000) + { + OffsetRect( rect, -32000 - rect->left, -32000 - rect->top ); + swp &= ~(SWP_NOMOVE | SWP_NOCLIENTMOVE); + } + goto done; + } + if (!data->mapped || data->iconic) goto done; /* only fetch the new rectangle if the ShowWindow was a result of a window manager event */