Commit Graph

3099 Commits

Author SHA1 Message Date
Zebediah Figura 50aeb5e777 user32: Do not delay-load setupapi.
This fixes a deadlock in the Steel Series Engine installer, between the
"user_section" lock and the loader lock.

Currently user32 takes the "user_section" lock during THREAD_DETACH, i.e. while
the loader lock is held. However, it is also possible for a thread to take the
locks in the reverse order. The observed path is:
 - register_builtin()
 - LoadCursorA()
 - get_display_bpp()
 - get_display_dc()
 - CreateDCW()
 - GetDeviceCaps(DESKTOPHORZRES)
 - GetSystemMetrics(SM_CXVIRTUALSCREEN)
 - EnumDisplayMonitors()
 - update_monitor_cache()

Since we now rely on setupapi for fundamental tasks such as determining screen
size, it doesn't make much sense to delay-load it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 18:04:35 +01:00
Dmitry Timoshkov 6ac2ba3e3c server: Ignore low word of a class instance when looking up for a window class.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Dmitry Timoshkov e2c0f51312 user32/tests: Add some tests for classes with non-zero low word instance.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Nikolay Sivov 56c75015c9 user32/tests: Link to activation context API directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 18:41:02 +01:00
Sven Baars 9bd51fff5d user32: Add EnableNonClientDpiScaling stub.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:34:13 +01:00
Akihiro Sagawa e98dbf2e94 user32: Fix wsprintfW %C conversion.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Akihiro Sagawa 20ff7ad9ee user32: Add wsprintfW %C tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Akihiro Sagawa 7cc21d0330 user32: Fix wsprintfA %C conversion.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Akihiro Sagawa 3b5619a8f4 user32/tests: Add wsprintfA %C conversion tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Akihiro Sagawa 92014581b6 user32/tests: Use wide string literals in wsprintf tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:26:53 +01:00
Jacek Caban be6e6fb23c user32: Initialize module handle to NULL for null driver.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:47:12 +01:00
Zhiyi Zhang ae157bec34 user32: Handle NULL device and not NULL mode parameters in ChangeDisplaySettingsExW().
This makes sure that user graphics drivers has a valid device name when a
DEVMODE is specified.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:59:18 +01:00
Zhiyi Zhang 12fa0ccea5 user32: Handle NULL device parameter in EnumDisplaySettingsExW().
This makes sure that user graphics drivers always have a valid device name.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:59:07 +01:00
Rémi Bernon b636f9cd5e user32/tests: Fix some format-overflow warnings.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Jacek Caban beaef92010 user32: Allow using null driver as a normal graphics driver.
When explicitly requested by config, Wine will use null driver in the
same way as we allow using it for invisible winstations.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 08:51:25 +01:00
Akihiro Sagawa fa8a9a81e6 user32: Fix wsprintfW %S conversion.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Akihiro Sagawa c8f46313e4 user32/tests: Add wsprintfW %S conversion tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Akihiro Sagawa 08bf605acb user32: Fix wsprintfA %S conversion.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Akihiro Sagawa e375f0d457 user32/tests: Add wsprintfA %S conversion tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Zhiyi Zhang b5603287b7 user32: Fix ChangeDisplaySettingsExW() minimum size check.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Zhiyi Zhang 7d94e9d0c3 user32: Trace more ChangeDisplaySettingsExW() flags.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Zhiyi Zhang 981fb4edb3 user32: Move ChangeDisplaySettingsExW() common code to user32.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:22 +01:00
Dmitry Timoshkov f5906a5cfb user32/tests: Add some tests for Static/SS_BITMAP control.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 21:30:39 +01:00
Zhiyi Zhang 153b82b0b3 user32/tests: Add more EnumDisplaySettings tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Zhiyi Zhang 0097035698 user32/tests: Add more ChangeDisplaySettings tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Brendan Shanks 22e0f03e92 user32: Support SetWindowPos() SWP_ASYNCWINDOWPOS flag.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:47:54 +01:00
Brendan Shanks b7121813bc user32: Pack messages sent with SendNotifyMessage().
Allows Wine internal messages with pointer arguments to be sent
asynchronously.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:47:54 +01:00
Nikolay Sivov 92d336263c user32: Improve window state handling in SetScrollInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42038
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-28 14:23:42 +01:00
Alexandre Julliard b933b5d06b user32/tests: Get rid of strncmpW() and strcpyW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-26 10:59:43 +01:00
Zebediah Figura 0cbadb716d user32/tests: Fix some test failures with Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 20:14:12 +01:00
Nikolay Sivov d0cd105d59 user32/tests: Use device context layout functions directly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-10 18:40:58 +01:00
Nikolay Sivov cb9f5e7d0e user32/tests: Remove some workarounds for older Windows versions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-09 09:24:38 +01:00
André Hentschel ec5c4221ad user32: Fix some spec file entries.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 22:45:09 +01:00
Nikolay Sivov 04643b789c user32/tests: Add some more SetScrollInfo() tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:12:16 +01:00
Zebediah Figura 657aecc283 user32/tests: Fix some test failures on Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-08 21:11:18 +01:00
Paul Gofman ade89071f0 user32/tests: Handle results on Win10 in test_Image_StretchMode().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Zebediah Figura 8387605959 user32/tests: Fix a dialog test failure on Windows 10.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Zebediah Figura 388dd4d890 user32/tests: Avoid testing that GDI handles are no longer valid.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-07 22:26:08 +01:00
Zebediah Figura d76527373b user32/tests: Get rid of the test for DC handle reuse.
It may be useful for demonstrating cache behaviour, but fails too frequently
on Windows to be reliable.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 20:23:54 +01:00
Zebediah Figura 89d67614ca user32/tests: Relax WindowFromDC() tests a bit.
Windows often reuses the DC handle for a different window (which may be in
another process).

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-06 20:23:02 +01:00
Zebediah Figura 497b9ed822 user32/tests: Make the DDE tests less verbose by default.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 20:10:46 +01:00
Zebediah Figura 6e4d441ce1 user32/tests: Work around a failure on Windows < Vista.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-01 19:19:12 +01:00
Francois Gouget 74ec06bee9 user32/tests: Don't trace the test_topmost() window handles.
They change from one run to the next, causing the failures to always
look new. Also for the topmost failures the window handle is irrelevant:
all that matters is which window got the wrong results.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Zebediah Figura 3305f12844 user32/tests: Work around failures on Windows 10 version 1607.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:04 +01:00
Zebediah Figura 986bfcadd7 user32/tests: Get rid of some Windows 9x workarounds.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:02 +01:00
Zebediah Figura 7473db002e user32/tests: Remove unnecessary uses of CREATE_SUSPENDED.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 18:01:00 +01:00
Rémi Bernon 6c47355006 user32/tests: Return MA_ACTIVATE to WM_MOUSEACTIVATE on main test window.
This shows that one of test_SetWindowPos is broken on Wine, and needs
to be fixed. It was previously fixed by some change in DefWindowProcA,
introduced in 71d35d8940 but that was a
unexpected side effect.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:12:28 +01:00
Rémi Bernon f6d671c343 user32/tests: Move TEST_MOUSEACTIVATE to test_defwinproc.
This test is actually testing the reply from DefWindowProcA, as the
window it was sent to is not handling this particular message.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:12:22 +01:00
Zhiyi Zhang 59e52108d5 user32/tests: Mark some GetDeviceCaps() tests as todo on Wine.
GetDeviceCaps(hdc, DESKTOPHORZRES/DESKTOPVERTRES) on Windows reports
the primary desktop, but on Wine it reports the virtual screen.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-24 11:50:51 +01:00
Francois Gouget fe18edd6f8 user32: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:59:03 +01:00