wine/ windows/painting.c dlls/user/painting.c
Alexandre Julliard
julliard at winehq.org
Thu Sep 2 12:38:35 CDT 2004
Rein Klazes <rklazes at xs4all.nl> writes:
>> And does
>> that call generate a WM_NCPAINT message?
>
> No.
>
> I have uploaded a +relay,+message,+win snip (300 KB) of the log at
> http://home.wanadoo.nl/wijn/tmp/wine2.log.bz2
OK, I see, it seems GetUpdateRect doesn't behave exactly like
GetUpdateRgn. This should fix it I think:
Index: dlls/user/painting.c
===================================================================
RCS file: /opt/cvs-commit/wine/dlls/user/painting.c,v
retrieving revision 1.10
diff -u -p -r1.10 painting.c
--- dlls/user/painting.c 26 Aug 2004 00:46:11 -0000 1.10
+++ dlls/user/painting.c 2 Sep 2004 17:35:12 -0000
@@ -314,8 +314,15 @@ INT WINAPI GetUpdateRgn( HWND hwnd, HRGN
*/
BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase )
{
+ WND *wndPtr;
+ BOOL ret = FALSE;
HRGN update_rgn = CreateRectRgn( 0, 0, 0, 0 );
- INT retval = GetUpdateRgn( hwnd, update_rgn, erase );
+
+ if (GetUpdateRgn( hwnd, update_rgn, erase ) == ERROR)
+ {
+ DeleteObject( update_rgn );
+ return FALSE;
+ }
if (rect)
{
@@ -332,7 +339,13 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LP
}
DeleteObject( update_rgn );
- return (retval != ERROR && retval != NULLREGION);
+ wndPtr = WIN_GetPtr( hwnd );
+ if (wndPtr && wndPtr != WND_OTHER_PROCESS)
+ {
+ ret = (wndPtr->hrgnUpdate != 0);
+ WIN_ReleasePtr( wndPtr );
+ }
+ return ret;
}
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list