Commit Graph

3569 Commits

Author SHA1 Message Date
Jacek Caban 3cbccd4477 server: Don't allow creating children of orphaned windows.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Jacek Caban 862d0eeff9 server: Orphan child windows when unlinking them from parent.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Jacek Caban 82572350cd server: Don't allow orphaned windows in set_parent request.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Rémi Bernon ce3abc225f user32/tests: Add a test for child window destruction on thread exit.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Jacek Caban 078bcc066c server: Don't immediately destroy child windows belonging to different thread in free_window_handle.
Notify their thread instead.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Alex Henrie 62910fffa4 user32/tests: Expect DialogBoxParam to set ERROR_CANNOT_FIND_WND_CLASS.
Fixes a testbot failure.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 15:48:36 +01:00
Rémi Bernon fb9237cf34 user32/tests: Move test_mdi early in the test list.
The test gets spurious GetScrollInfo SB_HORZ failures if some other
windows were created before using CW_USEDEFAULT positions, for instance
the window from test_capture_4.

This happened on some Win10 VMs, and was thought to be fixed with
9b5346df86bf1a85336ed03a67a630970ce08e9f, but it then broke the test on
some other VMs. This is hopefully a better fix, and it reverts the
previous one too.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=52507
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-07 17:32:59 +01:00
Dmitry Timoshkov cc91ba6da7 user32/tests: Actually test ShowWindow() return value.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-03 22:40:17 +01:00
Eric Pouech 10e0867f86 user32: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-02 13:46:34 +01:00
Zebediah Figura 69fd35d57d user32/tests: Remove unnecessary redefinitions of SPI_GETDESKWALLPAPER.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +01:00
Zebediah Figura 60c20ee2c5 user32: Remove no longer needed assert() workarounds for MinGW.
We build with msvcrt, so we don't link against MinGW's assert() anymore.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:18 +01:00
Rémi Bernon 9fea10cceb user32/tests: Add some possible broken results on Win7.
Can be reproduced randomly even without user32:monitor, for instance
running user32:win in a fresh Win7 VM.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51392
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 22:31:01 +01:00
Rémi Bernon ebe3cea01d user32/tests: Add proper tests for SetActiveWindow(0).
Shows that it switches focus to some other process window and back, and
only on some older Windows versions. Win10 simply returns 0 and does
nothing.

Stop calling it elsewhere, as it makes focus go to an unpredictable
window, which may very well not be ours.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51391
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=51130
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 22:31:01 +01:00
Rémi Bernon fa28e05cf5 user32/tests: Ignore messages for UserAdapterWindowClass windows.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=48815
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 22:31:01 +01:00
Rémi Bernon 34d1c100b0 user32/tests: Tweak window size to fix Win10 results.
Fix these failures:

> win.c:2445: Test failed: style 0x200000: expected !100
> win.c:2445: Test failed: style 0x300000: expected !100

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 22:31:01 +01:00
Fabian Maurer c027874439 user32/tests: Avoid "misleading indentation" warnings.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:54 +01:00
Alex Henrie ddfb6d518e user32: Send EVENT_OBJECT_FOCUS when the focus changes.
The NVDA screen reader needs this.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Rémi Bernon 30af95f45d user32: Remove FIXME from RegisterDeviceNotificationA.
There's no conversion to do, the device name in the filter is ignored.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Rémi Bernon 41ff8effa3 user32: Add a filter member to device_notification_details.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Jacek Caban df261bcf95 user32: Remove _wassert workaround.
We no longer link to mingwex.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Zhiyi Zhang 78ac7ae24d user32: Draw standard scroll bars in hovered state only when they were previously painted by DefWinProc().
When an application handles WM_NCPAINT by itself, standard scroll bars are not drawn even if
WS_HSCROLL or WS_VSCROLL is used. In this case, when handling WM_NCMOUSEMOVE, DefWinProc() shouldn't
repaint standard scroll bars to reflect hovered state, otherwise, DefWinProc() draws over the custom
non-client area painted by the application. This is also the behavior on XP.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51900
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:27:54 +01:00
Zhiyi Zhang b9110622be user32/tests: Test painting standard scroll bars in hovered state.
Mostly to test that standard scroll bars doesn't get painted in hovered state if they weren't
previously painted by DefWinProcA/W().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:27:47 +01:00
Zhiyi Zhang 2e81e5779d user32: Avoid recalculating the non-client hit-test value for NC_HandleNCMouseMove().
The wParam in WM_NCMOUSEMOVE messages already contains the non-client hit-test value.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:27:40 +01:00
Zhiyi Zhang b02405d799 uxtheme: Hook DefDlgProc() for dialog theming.
Fix controls on OpenMPT's channel setting dialog having incorrect background.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:31 +01:00
Rémi Bernon d416f1c4ce user32: Increase the default message buffer size.
The DS4 controllers are sending 563 bytes HID reports by default, this
translates to WM_INPUT messages larger than the default message size.

We would otherwise need an additional server roundtrip on each message,
and these devices are also known to be very verbose and continuously
send HID reports, so we really don't want it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-12 17:27:46 +01:00
Zhiyi Zhang d16998e0c7 user32/tests: Avoid fix blurry apps popup in test_DisplayConfigSetDeviceInfo().
When changing DPI, a "fix blurry apps" popup may appear on Windows 10. The popup may interfere with
other tests as it steals focus, causing them to fail. So set IgnorePerProcessSystemDPIToast to 1 to
temporarily disable the popup.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52108
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-10 11:30:51 +01:00
Huw Davies 3af8415ca9 user32: Set WM_CONTEXTMENU's wparam to the child window's handle.
DefWindowProc() does not propagate the wparam; it updates it instead.
Spotted by YAL.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52327
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-07 11:55:18 +01:00
Zhiyi Zhang 60faf44ed1 win32u: Allow selecting 32-bit DDBs into display compatible DCs.
Device context bit depths other than 32-bit are emulated and the real bit depth for display DCs is
still 32-bit. Thus, a 32-bit DDB should be allowed to be selected into a display compatible DC even
if the DC reports a different bit depth.

Fix a regression from d171d11.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51805
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 13:05:50 +01:00
Zhiyi Zhang bd0603b19d user32/tests: Test selecting DDBs of different depth into display compatible DCs.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-06 13:05:45 +01:00
Arkadiusz Hiler a60c5e6961 user32: Uppercase the RawInput device names sans the GUID.
This is a preparation for a patch that changes setupapi to return lowercased
device paths, which is the source of RawInput device name here. On Windows
RawInput returns mostly uppercase names (except the GUID) and we want to keep
that behavior.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 22:57:01 +01:00
Zebediah Figura 97bf2e7e1e user32: Free the created icon handle when using LR_COPYFROMRESOURCE.
Spotted by John Sullivan.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52207
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 22:06:38 +01:00
John Sullivan 4a20082167 user32: Call DestroyIcon() to delete icon handles in CopyImage().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52207
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 22:06:18 +01:00
Zebediah Figura 197f2ee6c0 user32: Do not use SetDIBits() in create_masked_bitmap().
The given bitmap is in DDB format, not DIB format.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51296
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 11:44:25 +01:00
Rémi Bernon a80f76819c user32: Throttle device list updates from GetRawInputDeviceList.
Up to once every 2s.

This fixes a regression from c2c78a2fe0,
which caused severe FPS drop in Samurai Shodown.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51282
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 12:10:01 +01:00
Rémi Bernon 6a30f12eef user32: Update rawinput devices on WM_INPUT_DEVICE_CHANGE reception.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51282
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 12:09:38 +01:00
Torge Matthies 28b77c9b72 win32u: Return an NTSTATUS from NtUserEnumDisplayDevices.
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:13 +01:00
Jacek Caban bfc3a28670 winevulkan: Use KeUserModeCallback for debug callbacks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:52:34 +01:00
Ziqing Hui d112d746c7 user32: Pass correct flags in CreateIconFromResource().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:41:32 +01:00
Ziqing Hui 3b26e293bc user32/tests: Call Destroy{icon, cursor}() before GetIconInfo().
For icons/cursors created by CreateIconFromResource(),
GetIconInfo() still succeed after they were destroyed,
which indicates that these icons/cursors are shared.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:41:28 +01:00
Ziqing Hui 9e74b207cf user32: Add an is_shared member to cursoricon_object.
It makes sure that shared icon/cursor created by CreateIconFromResourceEx()
won't be destroyed by Destroy{Icon,Cursor}().

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 10:45:36 +01:00
Ziqing Hui 1746ed9c7d user32/tests: Test CreateIconFromResourceEx() with resource bits.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 10:45:36 +01:00
Ziqing Hui 14c2874700 user32/tests: Test creating shared icon by CreateIconFromResourceEx().
The tests show that shared icon created by CreateIconFromResourceEx()
won't be destroyed by DestroyIcon(). However, a second call to it for the
same icon bits will return a different handle.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 10:00:25 +01:00
Ziqing Hui f111327095 user32/tests: Fix cursor state test failures for win10.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 10:00:21 +01:00
Jacek Caban 9596e7f2a4 win32u: Use user driver for wine_get_vulkan_driver.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 09:57:56 +01:00
Jacek Caban a48127034d win32u: Move 55aa brush implementation from user32.
And don't expose __wine_make_gdi_object_system.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:24:42 +01:00
Jacek Caban 66d2321a39 user32: Set %ecx to rect param when calling monitor enum proc.
This was accidentally removed by 318673405c.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 20:24:05 +01:00
Zhiyi Zhang 9c9274990e uxtheme: Do not hook DefDlgProc() for theming.
Currently there is no need to hook DefDlgProc(). Tests show that dialog theming shouldn't be
implemented in DefDlgProc().

Also fix a double free bug because WM_DESTROY in UXTHEME_DefDlgProc() calls CloseThemeData() even
when the theme handle is not opened when handling WM_CREATE in UXTHEME_DefDlgProc(). The bug can
be demonstrated by running comctl32/tests/propsheet.c tests with Light theme.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 12:22:49 +01:00
Jacek Caban fdf3015816 win32u: Move system parameters implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 11:00:06 +01:00
Jacek Caban 3570b09133 win32u: Move DPI mapping from EnumDisplayMonitors.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 10:59:05 +01:00