On Wed, 25 Aug 2004 19:46:11 -0500, you wrote:
Log message: GetUpdateRgn should clip the returned region to the client area. Changed GetUpdateRect and ExcludeUpdateRgn to call GetUpdateRgn. Moved these 3 functions to dlls/user/painting.c.
This has the effect that a program that like agent does this:
case WM_PAINT: if( GetUpdateRect(hWnd, ...) { hdc = BeginPaint(hWnd,...);
}
causes a lot of:
err:msg:DispatchMessageA BeginPaint not called on WM_PAINT for hwnd 0x1002c!
Is it not possible to restrict the update region to the client area in the first place?
Rein.
Rein Klazes rklazes@xs4all.nl writes:
This has the effect that a program that like agent does this:
case WM_PAINT: if( GetUpdateRect(hWnd, ...) { hdc = BeginPaint(hWnd,...);
}
causes a lot of:
err:msg:DispatchMessageA BeginPaint not called on WM_PAINT for hwnd 0x1002c!
Is it not possible to restrict the update region to the client area in the first place?
Not really, the non-client area needs to be painted too. What is the value of the 'erase' flag in the above GetUpdateRect call? And does that call generate a WM_NCPAINT message?
On Wed, 01 Sep 2004 19:39:25 -0700, you wrote:
Rein Klazes rklazes@xs4all.nl writes:
This has the effect that a program that like agent does this:
case WM_PAINT: if( GetUpdateRect(hWnd, ...) { hdc = BeginPaint(hWnd,...);
}
causes a lot of:
err:msg:DispatchMessageA BeginPaint not called on WM_PAINT for hwnd 0x1002c!
Is it not possible to restrict the update region to the client area in the first place?
Not really, the non-client area needs to be painted too. What is the value of the 'erase' flag in the above GetUpdateRect call?
0009:Call user32.GetUpdateRect(0001002c,4070fb08,00000000) ret=00618a0e
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
Rein.
Rein Klazes rklazes@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; }
On Thu, 02 Sep 2004 10:38:35 -0700, you wrote:
Rein Klazes rklazes@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
Yup, all the errors are gone.
Rein.