Module: wine
Branch: master
Commit: 40492eb0071478812436f3e21a2cd4aee1b7bccd
URL: https://gitlab.winehq.org/wine/wine/-/commit/40492eb0071478812436f3e21a2cd4…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Mon Feb 27 16:10:15 2023 +0800
user32/tests: Do not modify cursor position when simulating clicks.
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;
Module: wine
Branch: master
Commit: c7d748d2e55bfbf314b2ad739a413fa1acd7f901
URL: https://gitlab.winehq.org/wine/wine/-/commit/c7d748d2e55bfbf314b2ad739a413f…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Wed Feb 22 16:54:38 2023 +0800
gitlab: Make FVWM respect position hints.
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.…
- 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_…