[PATCH] user32: During destroy, don't send WM_ERASEBKGND to parent window if WS_CHILD is not set

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Jul 15 17:58:56 CDT 2021


On 7/15/21 5:56 PM, Zebediah Figura (she/her) wrote:
> Hello Andrew,
> 
> I don't think this is the right fix. Based on my tests, and bug 51140
> [1], I don't think we should be sending WM_ERASEBKGND even if the window
> does have WM_PARENT. E.g. the attached patch on top of your tests works
> on my Windows machine, but still fails on Wine.
> 
> When I tested it earlier I was unable to find a set of conditions where
> Windows does send WM_ERASEBKGND to the parent of a hidden window, but I
> didn't want to just remove that code without re-debugging bug 6006 [2].

It's also probably worth pointing out that the subject message and tests 
for this patch are misleading—the failure path doesn't really have 
anything to do with window destruction; it just happens that 
DestroyWindow() implicitly hides the window. Hence the SW_HIDE call in 
the attached patch.

> 
> ἔρρωσο,
> Zebediah
> 
> [1] https://bugs.winehq.org/show_bug.cgi?id=51140
> 
> [2] https://bugs.winehq.org/show_bug.cgi?id=6006
> 



More information about the wine-devel mailing list