On 09/01/2020 15:32, Dmitry Timoshkov wrote:
Gabriel Ivăncescu gabrielopcode@gmail.com wrote:
- case WM_CLOSE:
/* Some applications like Media Player Classic deadlock when the parent,
which is on a different thread, is notified before the destruction.
Windows also doesn't notify it, despite not having the style prior. */
SetWindowLongW(hwnd, GWL_EXSTYLE, GetWindowLongW(hwnd, GWL_EXSTYLE) | WS_EX_NOPARENTNOTIFY);
break; }
This is most likely wrong way of fixing this: if it's your own window then it should have correct styles from the start, if it's a foreign window then this requires a test case since it may break things.
I did add tests on the second patch in the series for exactly this. It's our own window, but it does seem that on Windows, it does not have the style set. However, it also does *not* notify the parent.
So setting it on WM_CLOSE is the only way I could get it to pass the test so it matches Windows.