comctl32/treeview: Return from TREEVIEW_LButtonDown when the treeview handle is invalid.
LButtonDown should return when the treeview handle is invalid (e.g. destroyed) after NM_CLICK to prevent further message processing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58211
--
v7: comctl32/treeview: Return from TREEVIEW_LButtonDown when the treeview handle is invalid.
https://gitlab.winehq.org/wine/wine/-/merge_requests/8258
On Fri Jun 27 08:51:24 2025 +0000, Zhiyi Zhang wrote:
> changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/8327/diffs?diff_id=189184&start_sha=83d1eda3ee528f697e33607386e2aa259e7983a4#0251bfdc5c488ffd767c45cd3a965188becc33f7_2357_2284)
v3: Added LVS_NOCOLUMNHEADER to make tests simpler.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8327#note_108185
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