Commit Graph

3554 Commits

Author SHA1 Message Date
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
Jacek Caban 7aab49d736 win32u: Move DPI mapping from GetMonitorInfoW.
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:58:57 +01:00
Jacek Caban b877c78ec5 win32u: Move NtUserGetDpiForMonitor 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 10:58:49 +01:00
Jacek Caban d08808d8f3 win32u: Implement NtUserGetSystemDpiForProcess.
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:58:39 +01:00
Jacek Caban aab62429c2 win32u: Implement NtUserGetProcessDpiAwarenessContext and NtUserSetProcessDpiAwarenessContext.
And use them in 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 10:58:27 +01:00
Jacek Caban bc12c971c3 user32: Provide partial null driver.
Provide functions that we still call from user32 to avoid crashes on wow64.

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:58:18 +01:00
Jacek Caban 72e3c91380 win32u: Move NtUserGetKeyboardLayoutName 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-03 16:56:08 +01:00
Jacek Caban a25148ae46 win32u: Move NtUserGetCursor 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-03 16:56:08 +01:00
Jacek Caban c87925bae3 win32u: Move NtUserShowCursor 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-03 16:56:08 +01:00
Jacek Caban 3867d253ed win32u: Move NtUserChangeDisplaySettings 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-02 20:20:40 +01:00
Jacek Caban 318673405c win32u: Move NtUserEnumDisplayMonitors 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-02 20:20:39 +01:00
Jacek Caban 45dcaf02fc win32u: Move GetMonitorInfo 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-02 20:20:39 +01:00
Jacek Caban 1f2c3e8538 win32u: Move NtUserEnumDisplaySettings 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-01 18:13:55 +01:00
Jacek Caban 8b9b2580a5 user32: Use NtUserGetDisplayConfigBufferSizes.
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-01 18:13:55 +01:00
Jacek Caban d7133c97d9 user32: Invalidate cache in update_monitor_cache when modification time matches current time.
Also preserve last error.

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-11-30 22:07:21 +01:00
Jacek Caban f6abd9d140 win32u: Implement NtUserEnumDisplayDevices.
And use it in 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-11-30 22:07:21 +01:00