This MR improves driver support for scaled HiDPI displays, by giving the application access to the full native resolution of the displays, rather than the logical resolution which is the Wayland default for client ignores scale hints. The application (and/or user through Wine settings) can then control the scale it renders at.
If the compositor doesn't support the required extensions to support application scaling, we fall back to compositor scaling. Note that compositor scaling may be sometimes desirable anyway, so in an upcoming MR I will introduce a driver registry option to force it if needed.
Here is how things look with the various options on a 2x scaled output:
1. Application scaling at 96dpi (i.e, 1x scaling)
![wine-wayland-app-scaling-96dpi](/uploads/b42e671e434059928b977e22ee4510dc/wine-wayland-app-scaling-96dpi.png)
2. Application scaling at 192dpi (i.e., 2x scaling)
![wine-wayland-app-scaling-192dpi](/uploads/eb752866a474af6dba8388a279e07ab1/wine-wayland-app-scaling-192dpi.png)
3. Compositor scaling 2x (with app scaling at 1x)
![wine-wayland-compositor-scaling](/uploads/d4a4a54dabcb750b6b63854d8fc2144f/wine-wayland-compositor-scaling.png)
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4203
win32u: Return ERROR_ACCESS_DENIED for WH_JOURNALRECORD and WH_JOURNALPLAYBACK on newer OS versions.
On > XP, settings WH_JOURNALRECORD or WH_JOURNALPLAYBACK hooks report ERROR_ACCESS_DENIED according to tests, even with administrator rights. PCSE_TERM depends on this to not crash. MSDN also says that journaling hooks APIs are unsupported starting in Windows 11.
So I hope this justifies the version check in NtUserSetWindowsHookEx().
--
v3: win32u: Return ERROR_ACCESS_DENIED for WH_JOURNALRECORD and WH_JOURNALPLAYBACK.
win32u: Return ERROR_GLOBAL_ONLY_HOOK when a thread ID is specified for global hooks.
user32/tests: Add more parameter checks for SetWindowsHookExA().
https://gitlab.winehq.org/wine/wine/-/merge_requests/4186