[PATCH 1/2] user32/tests: Add test for RedrawWindow with RDW_VALIDATE flag.
Roman Pišl
rpisl at seznam.cz
Wed Apr 22 07:50:57 CDT 2020
Dne 22. 04. 20 v 14:31 Dmitry Timoshkov napsal(a):
> Roman Pišl <rpisl at seznam.cz> wrote:
>
>> + /* RedrawWindow with RDW_VALIDATE triggers WM_PAINT with non-empty update region */
>> + flush_sequence();
>> + InvalidateRect( hwnd, NULL, FALSE );
>> + GetClientRect( hwnd, &rect );
>> + SetRectRgn(hrgn, rect.left, rect.top, rect.right, rect.bottom );
>> + check_update_rgn( hwnd, hrgn );
>> + RedrawWindow( hwnd, &rect, NULL, RDW_INTERNALPAINT|RDW_NOERASE|RDW_NOFRAME|RDW_UPDATENOW|RDW_VALIDATE );
>> + check_update_rgn( hwnd, 0 );
>> + ok_sequence( WmPaintUpdate, "PaintUpdate", FALSE );
>
> Probably RedrawWindow() should ignore RDW_VALIDATE if RDW_UPDATENOW is
> also set, did you try that?
>
Putting this to beginning of RedrawWindow:
+ if (flags & RDW_UPDATENOW)
+ flags &= ~RDW_VALIDATE;
breaks test:
msg.c:8185: Test failed: Paint: 1: the msg sequence is not complete:
expected 0000 - actual 0014
msg.c:8185: Failed sequence Paint:
msg.c:8185: 0: expected: msg 000f - actual: MsgCheckProc:
00000000002B0044 000f wp 00000000 lp 00000000 (flags 819)
msg.c:8185: 1: expected: nothing - actual: MsgCheckProc:
00000000002B0044 0014 wp 00160042 lp 00000000 (flags 59)
Putting this:
+ if ((flags & (RDW_UPDATENOW | RDW_INTERNALPAINT)) == (RDW_UPDATENOW
| RDW_INTERNALPAINT))
+ flags &= ~RDW_VALIDATE;
Breaks no test and also fixes the issue. Seems like a better solution so
far.
More information about the wine-devel
mailing list