Alexandre Julliard : user32: Fetch client and window rectangles in a single call.
Alexandre Julliard
julliard at winehq.org
Wed Jul 18 14:58:04 CDT 2018
Module: wine
Branch: master
Commit: 3735f36dc94ca68a9344520ac28b2f7d548b0b82
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3735f36dc94ca68a9344520ac28b2f7d548b0b82
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jul 18 10:09:55 2018 +0200
user32: Fetch client and window rectangles in a single call.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/painting.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 665e1c0..66e69f4 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -652,12 +652,12 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags )
if (whole_rgn)
{
- RECT client, update;
+ RECT client, window, update;
INT type;
/* check if update rgn overlaps with nonclient area */
type = GetRgnBox( whole_rgn, &update );
- WIN_GetRectangles( hwnd, COORDS_SCREEN, 0, &client );
+ WIN_GetRectangles( hwnd, COORDS_SCREEN, &window, &client );
if ((*flags & UPDATE_NONCLIENT) ||
update.left < client.left || update.top < client.top ||
@@ -667,15 +667,10 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags )
CombineRgn( client_rgn, client_rgn, whole_rgn, RGN_AND );
/* check if update rgn contains complete nonclient area */
- if (type == SIMPLEREGION)
+ if (type == SIMPLEREGION && EqualRect( &window, &update ))
{
- RECT window;
- GetWindowRect( hwnd, &window );
- if (EqualRect( &window, &update ))
- {
- DeleteObject( whole_rgn );
- whole_rgn = (HRGN)1;
- }
+ DeleteObject( whole_rgn );
+ whole_rgn = (HRGN)1;
}
}
else
More information about the wine-cvs
mailing list