From d2607ff6c9390d47e591657074188700fadfece6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 6 Nov 2012 14:52:28 +0100 Subject: [PATCH] user32: Force refreshing the non-client area when the window surface is changed. --- dlls/user32/winpos.c | 6 +++--- server/window.c | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 5a2f1f22bbe..eda5b780df8 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -2025,6 +2025,8 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, } old_width = win->rectClient.right - win->rectClient.left; old_visible_rect = win->visible_rect; + old_surface = win->surface; + if (old_surface != new_surface) swp_flags |= SWP_FRAMECHANGED; /* force refreshing non-client area */ SERVER_START_REQ( set_window_pos ) { @@ -2055,7 +2057,6 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, win->rectWindow = *window_rect; win->rectClient = *client_rect; win->visible_rect = visible_rect; - old_surface = win->surface; win->surface = new_surface; surface_win = wine_server_ptr_handle( reply->surface_win ); if (GetWindowLongW( win->parent, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) @@ -2076,8 +2077,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, if (ret) { if (surface_win) update_surface_region( surface_win ); - if (old_surface != new_surface || - ((swp_flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE) || + if (((swp_flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE) || (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW | SWP_STATECHANGED | SWP_FRAMECHANGED))) invalidate_dce( win, &old_window_rect ); } diff --git a/server/window.c b/server/window.c index 368171f9cd2..fc40d55515f 100644 --- a/server/window.c +++ b/server/window.c @@ -1724,14 +1724,6 @@ static void set_window_pos( struct window *win, struct window *previous, client_rect->bottom - old_client_rect.bottom != y_offset || !valid_rects || memcmp( &valid_rects[0], client_rect, sizeof(*client_rect) )); - /* if part of the non-client area was exposed, consider it changed */ - if (exposed_rgn && !frame_changed) - { - get_region_extents( exposed_rgn, &rect ); - offset_rect( &rect, client_rect->left, client_rect->top ); - frame_changed = (rect.left < client_rect->left || rect.top < client_rect->top || - rect.right > client_rect->right || rect.bottom > client_rect->bottom); - } } if (frame_changed || client_changed) -- 2.11.4.GIT