FVWM doesn't respect PPosition hints by default and tries to tile a window according to its rules. This might break tests that require a window at a specific position. For example, when setting the caption bar height to anything other than 18, some user32 tests start to fail. They succeeded previously just because the caption bar and border height on FVWM totals to 18, which is happens to be the same value used by Wine by default.
From: Zhiyi Zhang zzhang@codeweavers.com
FVWM doesn't respect PPosition hints by default and tries to tile a window according to its rules. This might break tests that require a window at a specific position. For example, when setting the caption bar height to anything other than 18, some user32 tests start to fail. They succeeded previously just because the caption bar and border height on FVWM totals to 18, which is happens to be the same value used by Wine by default. --- tools/gitlab/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gitlab/test.yml b/tools/gitlab/test.yml index 808c825eae9..78c462c3e20 100644 --- a/tools/gitlab/test.yml +++ b/tools/gitlab/test.yml @@ -30,7 +30,7 @@ VideoRam 32768 EndSection EOF - - echo 'exec /usr/bin/fvwm -f config -c "Style * MwmDecor" 2>/dev/null' >$HOME/.xinitrc + - echo 'exec /usr/bin/fvwm -f config -c "Style * MwmDecor" -c "Style * UsePPosition" 2>/dev/null' >$HOME/.xinitrc - startx -- -config $HOME/xorg.conf $DISPLAY & - test -f wine-gecko-$GECKO_VER-x86.msi || curl -o wine-gecko-$GECKO_VER-x86.msi https://dl.winehq.org/wine/wine-gecko/$GECKO_VER/wine-gecko-$GECKO_VER-x86.m... - test -f wine-gecko-$GECKO_VER-x86_64.msi || curl -o wine-gecko-$GECKO_VER-x86_64.msi https://dl.winehq.org/wine/wine-gecko/$GECKO_VER/wine-gecko-$GECKO_VER-x86_6...
From: Zhiyi Zhang zzhang@codeweavers.com
FVWM by default uses a focus follow mouse model so the window under the mouse cursor automatically gets focus. Windows explorer.exe and other windows managers use click to focus model. So on FVWM, if a test changes the cursor position, it might affects other tests that rely on a specific focus window. Restore the cursor position after sending simulating clicks to avoid affecting other tests unintentionally. FVWM could be configured to use a click to focus model, but right now it will make many tests starting to succeed and other tests fail. So it seems to be too big of a change. Flaky is added to test_SetWindowPos() because this patch makes the tests succeed on Gitlab CI but the same tests still fails for other window managers and on TestBots. --- dlls/user32/tests/win.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 1252e046ad3..31d14480861 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -3282,7 +3282,7 @@ static void test_SetWindowPos(HWND hwnd, HWND hwnd2) ret = SetWindowPos(hwnd_child, NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_SHOWWINDOW); ok(ret, "Got %d\n", ret); flush_events( TRUE ); - todo_wine check_active_state(hwnd2, hwnd2, hwnd2); + flaky todo_wine check_active_state(hwnd2, hwnd2, hwnd2); DestroyWindow(hwnd_child); }
@@ -10186,7 +10186,9 @@ static void simulate_click(int x, int y) { INPUT input[2]; UINT events_no; + POINT pt;
+ GetCursorPos(&pt); SetCursorPos(x, y); memset(input, 0, sizeof(input)); input[0].type = INPUT_MOUSE; @@ -10199,6 +10201,7 @@ static void simulate_click(int x, int y) U(input[1]).mi.dwFlags = MOUSEEVENTF_LEFTUP; events_no = SendInput(2, input, sizeof(input[0])); ok(events_no == 2, "SendInput returned %d\n", events_no); + SetCursorPos(pt.x, pt.y); }
static WNDPROC def_static_proc;
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/light.msstyles/light.rc | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/light.msstyles/light.rc b/dlls/light.msstyles/light.rc index be8b1dfda57..3a374f5416d 100644 --- a/dlls/light.msstyles/light.rc +++ b/dlls/light.msstyles/light.rc @@ -128,6 +128,17 @@ BLUE_INI TEXTFILE "MenuHilight = 48 150 250\r\n" "MenuBar = 255 255 255\r\n"
+"\r\n; Nonclient metrics\r\n" +"CaptionFont = Tahoma, 10, bold\r\n" +"CaptionBarHeight = 25\r\n" +"SmallCaptionFont = Tahoma, 8, bold\r\n" +"SMCaptionBarHeight = 17\r\n" +"SMCaptionBarWidth = 17\r\n" +"MenuFont = Tahoma, 8\r\n" +"StatusFont = Tahoma, 8\r\n" +"MsgBoxFont = Tahoma, 8\r\n" +"IconTitleFont = Tahoma, 8\r\n" + "\r\n; Flat menus\r\n" "FlatMenus = true\r\n"