user32/tests: Do not modify cursor position when simulating clicks.
commit40492eb0071478812436f3e21a2cd4aee1b7bccd
authorZhiyi Zhang <zzhang@codeweavers.com>
Mon, 27 Feb 2023 08:10:15 +0000 (27 16:10 +0800)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 15 Mar 2023 16:43:45 +0000 (15 17:43 +0100)
tree6e0f8753bbd722442efe39966ad7fc6588331d76
parentc7d748d2e55bfbf314b2ad739a413fa1acd7f901
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