Commit Graph

3019 Commits

Author SHA1 Message Date
Zhiyi Zhang b95c4c229c user32/tests: Fix monitor test failures on some systems.
On some systems, the monitor name may not be Default_Monitor,
so check format instead.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 15:20:56 +01:00
Zhiyi Zhang 6b2b004c0c user32/tests: Fix test failures on multiple monitor setup.
The desktop window rectangle is the same as that of primary monitor
for compatibility reasons. It equals to virtual screen rectangle only
when there are no more than two active and non-mirrored monitors.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 15:20:50 +01:00
Fabian Maurer 244268589e user32/edit: In EM_POSFROMCHAR return correct position for empty lines.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47305
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:09:51 +01:00
Rémi Bernon 766ee1692e user32/tests: Flush remaining events before starting a new sequence.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:43:13 +01:00
Rémi Bernon ad5ca21de6 user32/tests: Add optional flags for alternative sequence on w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:43:05 +01:00
Rémi Bernon e83486062d user32/tests: Skip tests expecting ascii VK wparam on non-us keyboards.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:50 +01:00
Rémi Bernon 32b3e502d9 user32/tests: Update SetActiveWindow(0) test result for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:44 +01:00
Rémi Bernon 37fe4b0bab user32/tests: Add some wparam mask to message sequences for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 23:42:33 +01:00
Huw Davies ae7531f673 user32: Remove unused GetAsyncKeyState() driver entry.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-06 16:04:03 +01:00
Rémi Bernon 9099b9843f user32/tests: Wait and flush messages after window creation.
The window created in the separate thread in test_Input_mouse sometimes
fails to catch the mouse input in time. Waiting and flushing the initial
messages seems to make the issue harder to reproduce.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:46:59 +01:00
Alistair Leslie-Hughes 71d35d8940 user32: WM_MOUSEACTIVATE should return MA_NOACTIVATE for WM_LBUTTONDOWN/HTCAPTION message.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47945
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 16:43:28 +01:00
Andrew Eikum 6d7828e8df user32: Support RIDI_PREPARSEDDATA in GetRawInputDeviceInfo.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Andrew Eikum 0b7f4b40cf user32: Clean up GetRawInputDeviceInfo.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Andrew Eikum 4a58d67106 user32/tests: Move rawinput tests into input.c.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 22:43:01 +01:00
Fabian Maurer fbec0ba9ee user32/combo: Properly handle WM_CTLCOLOR* messages.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 12:15:42 +01:00
Fabian Maurer 2feab9b99d user32/tests: Add combo tests for WM_CTLCOLOR*.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-04 12:15:38 +01:00
Rémi Bernon 4928f5134a user32/tests: Skip some tests with inconsistent results with non-us kbd.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:54:44 +02:00
Rémi Bernon dd497ffcdd user32/tests: Do not expect ToAscii with 'A' vkey to return 'a' on non-us keyboards.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:54:41 +02:00
Rémi Bernon c56c76e61e user32/tests: Do not expect char vkey to return the same char everywhere.
Results may depend on the keyboard layout, and the tests were failing on
VMs with non-us layouts.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:54:38 +02:00
Rémi Bernon 96f0d1ae7d user32/tests: Update input test result for w1064v1809.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-23 21:54:34 +02:00
Paul Gofman 2ac268436b user32: Fix coords in WINDOWPOS for WM_NCCALCSIZE sent from SetWindowPos().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40777
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 20:39:15 +02:00
Matteo Bruni aaecc40464 user32: Don't go past the end of the animated cursor data.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Brendan Shanks c8dbb0c4c1 user32: Fix behavior of GetWindowInfo(0, NULL).
Windows doesn't do a NULL check on the WINDOWINFO pointer.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24 11:34:18 +02:00
Brendan Shanks 38dd9faf96 user32/tests: Test GetWindowInfo error conditions and incorrect cbSize.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47783
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-24 11:33:55 +02:00
Zebediah Figura f5f633e712 server: Validate the filter window handle in get_message.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 21:55:16 +02:00
Zebediah Figura 7c768d9052 user32: Return -1 from peek_message() on error.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-18 21:55:16 +02:00
Zhiyi Zhang ca39b1c22d user32: Don't report mirrored slave monitors in EnumDisplayMonitors.
Mirrored slave monitors don't get enumerated by EnumDisplayMonitors.
For example, if two monitors are in mirrored mode, only one of them
is reported by EnumDisplayMonitors.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 22:58:41 +02:00
Alex Henrie 5644a10e9d user32: Avoid dead initialization (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:14:12 +02:00
Rémi Bernon 85d8d13904 user32: Add parameter validation for RegisterRawInputDevices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Rémi Bernon d8b222548d user32/tests: Add RegisterRawInputDevices parameter validation tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Zhiyi Zhang a3948047dd user32/tests: Fix some msg test failures.
These test failures sometimes happen on some TestBots.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-11 17:03:37 +02:00
Zhiyi Zhang afdf14084e user32/tests: Remove an extraneous check.
Remove a check for SetFocus() return value. It's useless and SetFocus()
returns NULL because there is no previous focus window, skipping
following tests unintentionally. And cleanup some code.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-03 20:42:56 +02:00
Paul Gofman 480bae108c user32: Return correct showCmd from GetWindowPlacement() for other process window.
Fixes black screen in SWTOR after window minimize / maximize or
switching window in full screen mode.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 22:39:50 +02:00
Zhiyi Zhang 8f45d9a991 user32: Wait for graphics driver to be ready in EnumDisplayDevicesW.
It's possible that EnumDisplayDevicesW gets called before graphics driver is loaded.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 14:18:49 +02:00
Huw Davies ef26257f6f user32: Don't query the nonclient metrics unless the font info is required.
This is an optimization that is particularly helpful for scrollbar code.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 20:34:18 +02:00
Zebediah Figura 5b39ef03d6 user32: Factor out add_device().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Zebediah Figura e1d6146fca user32: Introduce and use an array_reserve() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Zebediah Figura 2ed141d680 user32/tests: Test opening raw input devices.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-03 23:44:24 +02:00
Zhiyi Zhang 95be042be3 user32: Cache monitor information.
Multiple applications call EnumDisplayMonitors very frequently.
Reduce most of the overhead by caching.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47431
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 20:42:42 +02:00
Zhiyi Zhang d4115033ef user32: Specify enumerator when calling SetupDiGetClassDevsW.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 20:42:42 +02:00
Nikolay Sivov a476ae1991 server: Use KEYEVENTF_UNICODE mode only when virtual key code was not specified.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:39 +02:00
Nikolay Sivov 0b2fbab179 user32/tests: Add another test for KEYEVENTF_UNICODE mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:37 +02:00
Nikolay Sivov 4b13f859f7 user32/tests: Use SendInput() directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 14:41:36 +02:00
Zhiyi Zhang 23b28323cb winex11.drv: Use generic GetMonitorInfo.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 13:22:17 +02:00
Zhiyi Zhang 074abfe097 winex11.drv: Use generic EnumDisplayMonitors.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 13:22:17 +02:00
Zhiyi Zhang 8789742936 user32: Avoid a possible race.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 13:01:58 +02:00
Zhiyi Zhang db839e0f1a user32: Move EnumDisplayDevicesA/W to sysparams.c.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 13:01:58 +02:00
Huw Davies 3f9c5d7682 user32: Don't access a potentially uninitialized padded_border.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 22:51:55 +02:00
Gabriel Ivăncescu 501778aa08 user32/edit: Get rid of useless casts.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-14 10:26:25 +02:00
Gabriel Ivăncescu b95bc84273 user32/listbox: Fix mouse wheel scrolling for multi-column listboxes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22253
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-14 10:26:18 +02:00