From: Rémi Bernon rbernon@codeweavers.com
This adds a todo_wine because it exhibits a FVWM bug: the window manager doesn't keep the _NET_WM_STATE maximized bits, and instead simply resize the windows.
The missing events don't matter too much, although they would prevent us from serializing the updates with other changes, but it also makes it impossible to figure whether the windows are actually maximized or not.
For visible windows, the message we send to the window manager simply doesn't trigger any PropertyNotify event. The update is considered as pending until the maximized style is cleared, and we never try to remove the maximized state from the Win32 state.
For hidden windows, the _NET_WM_STATE property is changed directly, this sticks and we receive a corresponding PropertyNotify event. However, as soon as the window is mapped, FVWM removes the bits and we receive another PropertyNotify event accordingly. This can only be considered as a genuine state update, and we clear the maximized state from the Win32 side accordingly.
Previously, as the state updates were not re-entrant, the update didn't trigger another window manager state/config update and the window stayed in an inconsistent state, which somehow passed the tests.
As the updates are now re-entrant, the window manager is notified of the maximized state removal, and resizes the window to its normal size, then fails the tests. --- dlls/user32/tests/win.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 5f30818a830..c2da0b04dad 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -6034,6 +6034,14 @@ static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu) ok(hwnd != NULL, "Failed to create window class=%s, style=0x%08lx, exStyle=0x%08lx\n", class, style, exStyle);
ShowWindow(hwnd, SW_SHOW); + flush_events(TRUE); + + /* retry setting the maximized state to workaround a FVWM bug */ + if ((style & WS_MAXIMIZE) && !(GetWindowLongW(hwnd, GWL_STYLE) & WS_MAXIMIZE)) + { + ShowWindow(hwnd, SW_MAXIMIZE); + flush_events(TRUE); + }
test_nonclient_area(hwnd);