On Fri Jun 27 08:40:32 2025 +0000, Nikolay Sivov wrote:
> I see, so validating header rect reduces following erase region and
> preserves rendered header?
Yes. Normally, the original header implementation uses BeginPaint() when handling WM_PAINT, which automatically removes the update region. In this case, an application subclasses the header class and handles WM_PAINT without validating the update region. Thus, the header region is not preserved after calling BeginPaint(listview).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8447#note_108180
On Fri Jun 27 08:39:01 2025 +0000, Zhiyi Zhang wrote:
> I added that message sequence to show that the header is painted before
> WM_ERASEBKGND for the listview. Without the sequence, it might seem
> there are other possibilities. For example, the BeginPaint(listview)
> could be ahead of UpdateWindow(header), or maybe no WM_ERASEBKGND should
> be sent. Even if it remains a todo after the fix, I think it provides
> some insight about how it's supposed to work. So I would like to keep it
> if that's okay.
I see, so validating header rect reduces following erase region and preserves rendered header?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8447#note_108178
On Fri Jun 27 08:37:27 2025 +0000, Nikolay Sivov wrote:
> Do we need to check message sequences if they are going to remain todo
> after the fix?
I added that message sequence to show that the header is painted before WM_ERASEBKGND for the listview. Without the sequence, it might seem there are other possibilities. For example, the BeginPaint(listview) could be ahead of UpdateWindow(header), or maybe no WM_ERASEBKGND should be sent. Even if it remains a todo after the fix, I think it provides some insight about how it's supposed to work. So I would like to keep it if that's okay.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8447#note_108177
comctl32/listview: Test WM_PAINT with a subclassed header that paints without validating update regions.
--
v3: comctl32/listview: Validate header region after painting it.
comctl32/listview: Test WM_PAINT with a subclassed header that paints without validating update regions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8447