Hi Dmitry, Your "Do not play with WS_VISIBLE" patch(5ddac44dc2a6637613407fa900d3fafac37e70d8) in wined3d causes a regression with 3DMark2000. The rendering in this game is not visible. Readding the SWP_SHOWWINDOW flag to the SetWindowPos calls fixes the problem. But I have the impression that the main point of your patch was removing this flag, so I don't want to just add it again.
What were the reasons for removing the SWP_SHOWWINDOW flag?
Stefan
"Stefan Dösinger" stefan@codeweavers.com wrote:
Your "Do not play with WS_VISIBLE" patch(5ddac44dc2a6637613407fa900d3fafac37e70d8) in wined3d causes a regression with 3DMark2000. The rendering in this game is not visible. Readding the SWP_SHOWWINDOW flag to the SetWindowPos calls fixes the problem. But I have the impression that the main point of your patch was removing this flag, so I don't want to just add it again.
What were the reasons for removing the SWP_SHOWWINDOW flag?
If you need to make a window visible call ShowWindow, not remove WS_VISIBLE and later call SetWindowPos(SWP_SHOWWINDOW).
Am Sonntag 21 Januar 2007 05:58 schrieb Dmitry Timoshkov:
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. I will send a patch that shows the window using ShowWindow.
Is there any difference between ShowWindow(hwnd) and SetWindowPos(hwnd, ..., SWP_SHOWWINDOW)?
"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).