On Tue Aug 22 06:44:53 2023 +0000, Stefan Dösinger wrote:
In the current test WM_SIZE(*) gets sent twice below the d3d level - once when d3d resizes the window, and this message is filtered by d3d. The test tests that this is not supposed to be delivered. The second one is when fvwm assumes that the fullscreen window isn't fullscreen and resizes it. At this point d3d is long done changing the window size, stopped filtering, and WM_SIZE gets delivered. By changing the second mode switch to switch back to the original size fvwm never thinks it needs to change the window size because after d3d is done changing modes and resizing the window both the screen mode and window size match what fvwm knows about the screen size. Thus the first (ultimately filtered) WM_SIZE is generated by user32 when wined3d switches windows, and there is never an incorrect second one sent. (*) It is actually WM_WINDOWPOSCHANGING + WM_WINDOWPOSCHANGED, the WM_SIZE is just the response of DefWindowProc to WM_WINDOWPOSCHANGED.
Ah, I think that makes sense. So we resize the window from the registry mode to the new mode, but fvwm thinks that the registry mode is still the screen size, notices that the window is maximized with the "wrong" size, and tries to resize it back to the registry mode?