Commit Graph

1702 Commits

Author SHA1 Message Date
Arkadiusz Hiler f7edc32818 user32: Implement GetMouseMovePointsEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36873
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:37:16 +02:00
Zhiyi Zhang 9501a3d5ab user32/tests: Add display orientation tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 12:28:42 +02:00
Zhiyi Zhang af0ae9df1e user32/tests: Fix a test failure.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Rémi Bernon d50c310da9 user32: Return TRUE from ShowWindow(SW_SHOW) if already visible.
Instead of calling SendMessage, similarly to the SW_HIDE case.

Based on a patch by Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39731
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-11 16:55:40 +02:00
Zhiyi Zhang 1aa7c9af90 winex11.drv: Store a full display mode in registry.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 11:08:46 +02:00
Zhiyi Zhang fd29fe4ea7 user32/tests: Add more registry display mode tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 11:08:44 +02:00
Rémi Bernon 1e7378d80c user32: Implement GetRegisteredRawInputDevices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:17:11 +02:00
Rémi Bernon a3aa9ae80a user32/tests: Add basic GetRegisteredRawInputDevices tests.
There's already some in dinput, but this is a more appropriate location.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 21:15:38 +02:00
Zhiyi Zhang 0fa4613811 user32/tests: Fix a failing test on Windows 10 1909.
Although most of the older Windows versions allow changing to a 1Hz display mode, it returns failure
on Windows 10 1909+.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 12:26:25 +02:00
Zhiyi Zhang 34a5f04286 user32/tests: Remove some todo_wines.
Monitor positions are now correctly reported by the XRandR 1.4 display settings handler.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 12:26:23 +02:00
Zhiyi Zhang 6d68c38c88 user32/tests: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
Zero initialize DEVMODE before passing it to EnumDisplaySettings(), which may write beyond the end
of the DEVMODE structure on Windows because the dmDriverExtra field is uninitialized.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:06:42 +02:00
Serge Gautherie 99c0ab2ea1 winapi_test: Restore horizontal alignment of macro defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:26:15 +02:00
Zhiyi Zhang d13b61b738 winex11.drv: Support detaching adapters.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:37:28 +02:00
Zhiyi Zhang 4a24816313 winex11.drv: Support automatic display position adjustment.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:37:26 +02:00
Piotr Caban 5bb4e4b36c user32: Support undocumented SC_SIZE flag that can be used to move window.
Fixes main window moving in Quicken 2020.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-30 16:33:22 +02:00
Zhiyi Zhang 9905a5a81d winex11.drv: Add XRandR 1.4 display settings handler.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Zhiyi Zhang 46182aa559 user32: Check invalid device names in EnumDisplaySettingsExW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Zhiyi Zhang a599d645e3 user32: Check invalid device names in ChangeDisplaySettingsExW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:34 +02:00
Zhiyi Zhang dcf8bd769b user32/tests: Add more ChangeDisplaySettings() tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:32 +02:00
Zhiyi Zhang 7b5dac2fe1 user32/tests: Test that EnumDisplayMonitors() doesn't set error codes.
ERROR_INVALID_HANDLE or ERROR_INVALID_MONITOR_HANDLE is from
GetMonitorInfo(), not EnumDisplayMonitor().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:30 +02:00
Brendan Shanks 894c6566ab user32/tests: Test DisplayConfigGetDeviceInfo() GET_SOURCE_NAME with valid ID and invalid LUID.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Brendan Shanks 8949f57086 user32: Handle GET_SOURCE_NAME in DisplayConfigGetDeviceInfo().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Rémi Bernon e0e3b6bc91 user32: Use WM_INPUT message hw_id as RAWINPUT handle.
This fixes the GetRawInputData regression introduced with
359ee2ecc2 where the message data couldn't
be read twice, while keeping the overwrite logic it introduced.

This also adds some SetLastError to fix some unit tests todos.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49522
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 22:24:39 +02:00
Rémi Bernon b58a899acc user32/tests: Add more GetRawInputData tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 22:24:36 +02:00
Brendan Shanks cb127e11ad user32/tests: Add more QueryDisplayConfig() tests.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 15:07:33 +02:00
Brendan Shanks 5fba152eea user32: Implement QueryDisplayConfig().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 15:07:33 +02:00
Brendan Shanks 2e1c48f351 user32/tests: Test additional flag values with GetDisplayConfigBufferSizes().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 15:07:33 +02:00
Rémi Bernon 359ee2ecc2 user32: Return failure when rawinput has been overwritten.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:07:37 +02:00
Rémi Bernon 3a9edf9aad user32: Implement GetRawInputBuffer.
CoD: WWII uses it to read mouse motion instead of listening to WM_INPUT
messages.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:07:37 +02:00
Rémi Bernon 083cb5c783 user32/tests: Add GetRawInputBuffer tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 21:06:52 +02:00
Rémi Bernon 27a52d0414 server: Implement RegisterRawInputDevices RIDEV_INPUTSINK flag.
This flag allows applications to receive rawinput messages while in
background. They have to specify a target hwnd, which will receive them,
and the messages will carry a RIM_INPUTSINK wparam if the process wasn't
foreground.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon 8cf7fe3b7c server: Implement RegisterRawInputDevices RIDEV_NOLEGACY flag.
This makes legacy mouse window messages such as WM_MOUSEMOVE and others,
to stop being sent, including to low-level hooks. The desktop mouse
state should still be udpated.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon 57124b9905 server: Implement rawinput inter-process message dispatch.
This delivers the rawinput messages to the correct process, regardless
of where the input was received.

As for now RIDEV_INPUTSINK is still not implemented, this only fixes
the case where input is injected in a background process and where it
should not receive rawinput -as in the test- or when cursor moves over
a background window and the foreground process should have received
rawinput messages.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Rémi Bernon 5daf0efbfe user32/tests: Add inter-desktop rawinput message tests.
Another thread is created to execute the tests, for SetThreadDesktop to
succeed consistently. It seems to fail spuriously if it is called from
a thread that already created some windows before.

This shows that rawinput messages may be dispatched across desktops,
but only if the subscribing process has a window in the input desktop,
and it is the foreground process (even if the target window may be in
another desktop).

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-25 23:08:30 +02:00
Huw Davies aec5ccfc06 server: Don't allow an empty desktop name.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 18:34:15 +02:00
Huw Davies afe3e698c5 user32/tests: Use skip() to skip tests when using a non-US keyboard.
Otherwise, under Wine, win_skip() counts as a failure.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 18:34:15 +02:00
Rémi Bernon bc282905d9 user32/tests: Add RIM_EXINPUTSINK rawinput message tests.
When RIM_EXINPUTSINK is used, messages are received in background
only if the foreground process didn't register for rawinput messages
itself.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 22:45:20 +02:00
Rémi Bernon df5d632324 user32/tests: Add inter-process rawinput message tests.
Rawinput messages are not received anymore if the foreground window is
from another process. Using RIDEV_INPUTSINK makes it possible to receive
them again, but with RIM_INPUTSINK flag.

When multiple processes register for rawinput messages, the foreground
process will receive the message, as well as any other that registerd
with RIM_INPUTSINK flag, including when the foreground process itself
did.

Currently the messages may be received correctly, but that depends on
where the input events are generated, so add another test case with
messages sent from the test process, and validate that nothing should
be received.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 22:45:17 +02:00
Rémi Bernon 8c7c0c5504 user32/tests: Add inter-thread rawinput message tests.
The rawinput messages are received on the target window if is from the
same process as the foreground window, it doesn't need to be the
foreground window itself, or use RIDEV_INPUTSINK.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 22:45:15 +02:00
Rémi Bernon 36a74a7002 user32/tests: Add basic rawinput message tests.
This tests basic functionality by injecting mouse event and checking
the number of each messages received.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 22:45:11 +02:00
Huw Davies 6e69e512d8 user32: Use a default name for winstations created or opened with no name.
The default is of the form "Service-0x<luid high>-<luid low>$" where the
luid in question is the logon session luid.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 19:31:18 +02:00
Zhiyi Zhang c4a01d0a65 winex11.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.
0 or 1 in dmDisplayFrequency means to use the default frequency.

Fix Disgaea PC and Ostriv failing to launch in exclusive fullscreen mode.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:25 +02:00
Zhiyi Zhang 203bd057cf user32/tests: Test changing to a 1Hz display mode.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:25 +02:00
Zhiyi Zhang 1b33e0f72e winex11.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
Set DM_POSITION and DM_DISPLAYORIENTATION when calling
EnumDisplaySettings(ENUM_REGISTRY_SETTINGS). DM_DISPLAYFIXEDOUTPUT
is not set because it is not necessarily reported according to tests.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Arkadiusz Hiler 65e550d265 user32: Fix NULL dereference in UnregisterDeviceNotification.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49211
Signed-off-by: Arkadiusz Hiler <arek@hiler.eu>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 21:09:21 +02:00
Markus Engel ace37a68b7 user32/tests: Add more tests for GetKeyState().
Signed-off-by: Markus Engel <markus_wine@familie-engel.online>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 22:03:52 +02:00
Zhiyi Zhang c69bb0342c winex11.drv: Update _NET_WM_STATE before resizing windows.
According to the Extended Window Manager Hints (EWMH) spec 1.3 regarding
_NET_WM_STATE_FULLSCREEN, "the Window Manager is responsible for
restoring the original geometry after a switch from fullscreen back to
normal window.", which means that removing _NET_WM_STATE_FULLSCREEN from
a window may cause the window to receive a ConfigureNotify event to
restore the window size, thus causing a application resize action to be
overwritten by the window managers.

Fix a game called Mugsters becomes maximized after exiting full screen.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 20:13:16 +02:00
Zhiyi Zhang 36b720357b user32/tests: Test restoring a full screen window with WS_THICKFRAME style.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 20:13:14 +02:00
Brendan Shanks 148fc1adb5 user32/tests: Test success for QueryDisplayConfig() and DisplayConfigGetDeviceInfo().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 21:22:44 +02:00
Brendan Shanks c95adb32b8 user32/tests: Rename DisplayConfig test functions to match style.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 21:22:41 +02:00