Module: wine Branch: master Commit: 0bc93684f011d35fa63cdc126f938fa4adac7452 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bc93684f011d35fa63cdc126f...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Oct 15 16:17:22 2012 +0200
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 7d14b12..bfc3830 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 f5f7af5..8b76441 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 */