user32: Preserve the surface contents when changing the WS_EX_LAYERED bit.
authorAlexandre Julliard <julliard@winehq.org>
Wed, 9 Dec 2015 11:10:24 +0000 (20:10 +0900)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 9 Dec 2015 15:12:43 +0000 (00:12 +0900)
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/user32/win.c

index 887fd48d75ca85ae101c64d530fc7e286e5224f8..e378ab96526859b0e45df6e57fcdf3010c175eb8 100644 (file)
@@ -438,11 +438,13 @@ static void send_parent_notify( HWND hwnd, UINT msg )
  */
 static void update_window_state( HWND hwnd )
 {
-    RECT window_rect, client_rect;
+    RECT window_rect, client_rect, valid_rects[2];
 
     WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect );
+    valid_rects[0] = valid_rects[1] = client_rect;
     set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE |
-                    SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW, &window_rect, &client_rect, NULL );
+                    SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW,
+                    &window_rect, &client_rect, valid_rects );
 }