Files
test/intern/ghost
Campbell Barton c52c8874e9 GHOST/Wayland: scalable vector cursor support via cursor-generators
Support showing vector cursors at the appropriate size based on each
monitors DPI.

This solves incorrectly sized cursors with Hi-DPI outputs as well as
supporting outputs with different DPI's.

Instead of passing pixel data, pass an object that can generate cursors,
GHOST/Wayland can then ensure the correct size is used based on the
display the cursor is shown on.

While may sound overly complicated it actually simplifies displaying
cursors on Wayland, especially for multiple monitors at different DPI's.
Showing cursors at higher or lower resolutions than the monitor's DPI
also behaves differently on GNOME & Plasma, resulting in situations
where the cursor would show larger/smaller than expected.

Details:

- Take advantage of the recently added SVG cursors & BLF time cursor
  !140990 & !141367.
- Setting bitmap cursors via GHOST_SetCustomCursorShape is now a no-op
  for Wayland since it's no longer used. This was supported in an
  earlier version of this PR and could be restored if needed.
- While fractional scaling works it relies on the compositor downscaling
  the cursors. Ideally they would be rendered at the target size but
  this isn't a priority as the difference isn't noticeable.

Ref !141597
2025-07-18 12:38:52 +10:00
..