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!
--
v2: winewayland.drv: Ignore spurious size hints.
winewayland.drv: Present cursors with the correct scale.
winewayland.drv: Refactor cursor code to prepare for scaling support.
winewayland.drv: Present surfaces with the correct scale.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4203