From: "Chao Long" Subject: [PATCH] user32: Fix store the surface rectangle in the server. Message-Id: <202006221803583129431@uniontech.com> Date: Mon, 22 Jun 2020 18:03:59 +0800 From fe16ecf37c1943fb3a227058b6b1654077f743ba Mon Sep 17 00:00:00 2001 From: Chao Long Date: Mon, 22 Jun 2020 17:56:21 +0800 Subject: [PATCH] user32: Fix store the surface rectangle in the server. When I was debugging an application, I noticed that you had added patch for new_surface: 85f81948de1d7fe6d6d16f681a3a7cf8c08a566f, 6ccb94392a8ef4bca701ae2a560f4ea1da677edd They cause bugs with the following window refresh: 1. Dragging the window edge to scale the window will cause a window top toolbar refresh error. 2. Changing the window size also causes a window top toolbar refresh error. 3. Open the image with the app. The first image will be incomplete. 4. Window showing a transparent background whose background has not been drawn. After trying to modify the conditions of new_surface, I was able to fix most of the bugs, but not the root of the problem. Signed-off-by: Chao Long --- dlls/user32/winpos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index b92a20df18..6899c76b04 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2127,7 +2127,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, if (!EqualRect( window_rect, &visible_rect ) || new_surface || valid_rects) { extra_rects[0] = extra_rects[1] = visible_rect; - if (new_surface) + if (new_surface && swp_flags & SWP_FRAMECHANGED) { extra_rects[1] = new_surface->rect; OffsetRect( &extra_rects[1], visible_rect.left, visible_rect.top ); -- 2.20.1