"Stefan Dösinger" stefan@codeweavers.com wrote:
If you need to make a window visible call ShowWindow, not remove WS_VISIBLE and later call SetWindowPos(SWP_SHOWWINDOW).
So showing the window is fine, what was wrong before was removing all the flags and then showing the window again.
Yes, that forces the window to be mapped to the screen again regardless of its previous state. That also leads to a not necessary fullscreen requests to a WM even if a window was already properly fullscreen'ed before.
I will send a patch that shows the window using ShowWindow.
Is there any difference between ShowWindow(hwnd) and SetWindowPos(hwnd, ..., SWP_SHOWWINDOW)?
ShowWindow does nothing if the window is already visible while SetWindowPos goes through very complicated way of things with possibly some side effects (due to sent messages).