Commit Graph

3193 Commits

Author SHA1 Message Date
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
Nikolay Sivov 832b748b06 user32/listbox: Update caret index on LB_SETSEL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47459
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Nikolay Sivov b37b3f00a6 user32/listbox: Scroll to specified caret index.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Francois Gouget cca965d94e user32/tests: Fix the spelling of an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget ba1aa24378 user32: Fix the spelling of a TRACE() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget 6ccd78e35f user32/tests: Avoid a couple of unneeded strlen() calls.
Note that DeviceString is an array field and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget 3b91403e41 user32/tests: Avoid an unneeded lstrlenA() call.
Note that ptr may be NULL (see ok() check a few lines up).

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Francois Gouget e248170e30 user32/tests: Avoid an unneeded (&commented out) strlen() call.
Note that pathBuffer is an array and thus cannot be NULL.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:46 +01:00
Alexandre Julliard aa82739331 user32: Forward string calls to kernelbase.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Zhiyi Zhang 11065839f5 user32/tests: Use a higher resolution in test_ChangeDisplaySettingsEx().
640x480 is not supported on some Windows 10 versions.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:35:06 +01:00
Zhiyi Zhang dbab697da8 user32/tests: Test cursor clip rectangles in per-monitor aware context.
So the tests don't fail in HiDPI environment.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:34:59 +01:00
Zhiyi Zhang 4fc651db92 user32/tests: Import functions if possible.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 09:34:40 +01:00
Derek Lesho 11ef39af39 users/tests: Test scan code prefix for MAPVK_VK_TO_VSC_EX.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
John Alway 35919eb6a1 user32/tests: Add a test for combo resizing from smaller item height.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:49 +01:00
Nikolay Sivov ad6a8d50e8 user32/combo: Force minimal item height.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:44 +01:00
Nikolay Sivov 722f4fc084 user32/combo: Remove redundant argument from border painting helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:40 +01:00
Nikolay Sivov 76ef090f3d user32/combo: Remove unnecessary argument from button painting helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:36 +01:00
Nikolay Sivov 14e074b2a4 user32/combo: Remove redundant argument from text height helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:33 +01:00
Nikolay Sivov 13d7cad9de user32/combo: Simplify child controls position update helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:33 +01:00
Nikolay Sivov b563ea018b user32/combo: Simplify rectangles sizing helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 15:38:32 +01:00
Francois Gouget c56116aa37 user32/test: Start the AdjustWindowRectExForDpi() from a known state.
rect and rect2 have been modified by the previous test by the time we
get to AdjustWindowRectExForDpi(). This makes interpreting the traces
harder in case of a failure. So reset them to the same starting state
as for the AdjustWindowRectEx() test.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 21:01:33 +01:00
Rémi Bernon fdfc602284 user32/tests: Add optional messages to test sequences.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon c1b8deeff0 user32/tests: Wait longer for injected mouse event to take effect.
Also rework the wait loop a bit, the delay was weird.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon 0779443518 user32/tests: Synchronize with other thread between SendMessage calls.
This sometimes fails on Windows because we check the queue status before
the other thread second call to SendMessage has been made (or received).

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:59 +01:00
Rémi Bernon 19c107335e user32/tests: Make the test_PeekMessage3 timer fire less often.
On Windows it sometimes fires again before we get the expected WM_USER
message and/or before the end of the test where we don't expect any more
message. We cannot fire it only once because Wine doesn't pass the tests
yet and it would block otherwise, but fire it less often helps the test
to pass on Windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:58 +01:00
Rémi Bernon 1450924e59 user32/tests: Ignore WM_WININICHANGE message in test sequences.
Tests sometimes fail because of an unexpected 0x001a message.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 09:31:58 +01:00
Rémi Bernon 8134b8b6f5 user32/tests: Close event at the end of the test_WaitForInputIdle test.
There's some random timeout failures on Windows VMs in this test, this
is probably not going to fix them, but cleaning up is not going to hurt.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:44:41 +01:00
Rémi Bernon 41094ed5ba user32/tests: Synchronize with the SendMessageTimeout thread.
We wait a bit after starting the thread, but sometimes the test fails
because we didn't wait long enough. This synchronizes the Sleep and the
SendMessageTimeout calls.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:42:13 +01:00
Rémi Bernon 843cadb728 user32/tests: Tweak test result for w1064v1809.
Seems like the wparam is not always as expected.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:41:56 +01:00
Rémi Bernon b6f7c0a492 user32/tests: Increase test_timers count tolerance on Windows.
Sometimes the tests fail on w1064v1809 with count equals to 54, or 53.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-13 08:41:50 +01:00
Piotr Caban cfa9334125 user32: Include png.h only if SONAME_LIBPNG is defined.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 22:20:22 +01:00
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
Zhiyi Zhang a985771f83 user32: Implement EnumDisplayDevicesW().
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-13 08:21:00 +02:00
Zhiyi Zhang 8f5fbfeb42 user32: Improve EnumDisplayDevicesW stub.
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-13 08:21:00 +02:00
Zhiyi Zhang eada617881 winex11.drv: Initialize adapter registry data.
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-13 08:20:01 +02:00
Zhiyi Zhang 52a3d5db48 winex11.drv: Add Xinerama display device handler.
Display device handlers are used to initialize the display device
registry data. Different handlers can be implemented according to
the defined interface, for example, via Xinerama or XRandR.
With those registry data, EnumDisplayDevices, EnumDisplayMonitors
and GetMonitorInfo can be built on top of it.

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-13 08:09:55 +02:00
Zhiyi Zhang 1caf992be3 user32/tests: Test restore window messages.
Mostly to show that there is a WM_ACTIVATE message
before WM_SYSCOMMAND SC_RESTORE and after WM_WINDOWPOSCHANGED

The Alt+Tab test won't work on non-Windows because the emulated key inputs
doesn't reach the host, unless we required user interaction.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:42:38 +02:00
Sven Baars 381c4e7b66 user32: Fix some leaks on error path (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-31 22:31:33 +02:00
Gabriel Ivăncescu f748d6794d user32/listbox: Don't try to paint non-visible items for multi-column listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:26 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Francois Gouget 1631f69022 user32: Make WIN_SetOwner() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:20:31 -05:00
Louis Lenders 34408796b9 user32: Added GetPointerType stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45765
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 18:46:25 +02:00
Akihiro Sagawa e78d7b08fe user32: Make the second parameter of get_font_margins const.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Vlad Bespalov fd5f03035c user32: Make LoadString[AW] patchable.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46626
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Vlad Bespalov <vlad.botanic@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:24 +02:00
Akihiro Sagawa 1b91c113ae user32: Fix edit control margins in CJK font case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:16:13 +02:00
Akihiro Sagawa 491b061123 user32/tests: Add more margin tests in CJK font case.
In WM_SETFONT with a combination of CJK font and non-CJK charset,
Unicode version control uses ABC width for margins,
while ANSI version one uses EC_USEFONTINFO width for margins.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:16:04 +02:00
Akihiro Sagawa f3dc99c8b1 user32: Implement WM_SETFONT margins in the CJK case.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46685
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Akihiro Sagawa c8c29eebc7 user32/tests: Use calculated WM_SETFONT margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Akihiro Sagawa 6b2c2d39bb user32/tests: Remove win9x workarounds in margin tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Akihiro Sagawa a4560e0135 user32/tests: Use GREEK_CHARSET in margin tests to avoid Associated Charset feature.
Due to Associated Charset feature, we currently use Chinese typeface in the
test in zh_CN locale. For consistency with another locale, we should avoid
the fature in tests.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Zebediah Figura 8d251a1dd1 user32: Use GetSysColorBrush().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:01:57 +02:00
Akihiro Sagawa c5823e9cac user32: Implement EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Akihiro Sagawa 8ba6c1f2fc user32/tests: Use calculated EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
Sebastian Lackner c02407e9a3 user32: Implement CWF_CREATE_ONLY flag for CreateWindowStation.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 09:55:23 +02:00
Michael Stefaniuc 516dc52401 user32: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Alexandre Julliard 5aa83bee08 user32: Add a dummy _wassert implementation to avoid a Mingw build issue.
_wassert references __imp__MessageBoxW@16 which causes a duplicate
definition of MessageBoxW.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 16:51:26 +01:00
Akihiro Sagawa 3e61c7127e user32/tests: Tests default margin size with various font face.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 22:07:04 +01:00
Akihiro Sagawa 11f0597074 user32/tests: Add Unicode version tests for Edit control margins.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 22:06:46 +01:00