https://bugs.winehq.org/show_bug.cgi?id=15346
--- Comment #36 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Created attachment 63094 --> https://bugs.winehq.org/attachment.cgi?id=63094 Query the X server for the actual rect of the window before unmapping it
Here's an attempt at fixing this without disabling WM integration (which obviously isn't desirable, else people would disable the option themselves).
The problem seems to be the unmap itself (that's why it disappears). Currently, Wine checks if the rect is outside the screen and was inside of it before, and then unmaps it in this case. But the WM can interfere with this and the actual rect may not be outside after all.
This patch just queries the X server for the window's rect in this case, which seems to solve the problem for me.
Please test it if you can, I hope it doesn't break anything (can't really see why but the unmapping itself is suspect to me and I don't have much experience with the X11 code).