https://bugs.winehq.org/show_bug.cgi?id=52515
--- Comment #2 from Zhiyi Zhang zzhang@codeweavers.com --- Created attachment 71862 --> https://bugs.winehq.org/attachment.cgi?id=71862 test program
I spent several days looking at this bug but haven't been able to figure out why on Windows this doesn't appear. I can reproduce this problem with control spy v6 as well. So I use it to debug since the bug behavior with foobar2000 is less visible comparatively. When enlarging control spy horizontally, there is a good chance the "Extended styles" list box horizontal scrollbar overlaps the buttons on its right, e.g., Apply, Recreate and Reset buttons. The reason why this would happen on Wine is something like this. When the application receives size change messages, MoveWindow(listbox_handle, positions..., TRUE) and MoveWindow(button_handle, positions..., TRUE) is called. When the list box paints the scrollbar, it paints into the original window rectangle that the buttons were in, so their window content is corrupted. Then, MoveWindow(button_handle, positions..., TRUE) will use move_window_bits_parent() to move the corrupted content to the new window rectangle. The problem is, on Windows, right after WM_WINDOWPOSCHANGING messages, WINDOWPOS.flags get added a SWP_NOCOPYBITS bit on Windows. This bit is not from the application, so it's from SetWindowPos() internally. And I haven't been able to figure out the condition that Windows automatically add this bit. It seems to be some kind of live resize heuristics. I also try to reproduce the same behavior using a sample program. However, the bug can be reproduced on Windows as well with the sample program so it's not helpful. Running out of ideas, I have to give this up for the moment.