GNOME 48 Mutter To Enjoy Improved Cursor Scaling For Wine Wayland & More

Written by Michael Larabel in GNOME on 13 December 2024 at 06:21 AM EST. 12 Comments
GNOME
Merged this week to GNOME's Mutter compositor for the GNOME 48 release is support for the wp_viewport protocol for cursor surfaces in order to provide a nicer experience on cursor scaling.

This wp_viewport support for cursor surfaces within GNOME Mutter is both for hardware and software cursors and can work during window/desktop screencasting.

Alexandros Frantzis explained last year in the issue ticket tracking support for wp_viewport for cursor surfaces:
"Wine Wayland allows applications to render in the native output resolution, regardless of any compositor side scaling. It uses wp_viewport to achieve this goal (e.g., if scale=2 buffer=100x100 it sets viewport destination to 50x50 in order for the buffer to be displayed as 100x100 physical pixels on screen). Using wp_viewport (rather than set_buffer_scale) is also the only way to deal with fractional scales.

However, it seems that Mutter does not support wp_viewport for cursor wl_surfaces. For integer scales, set_buffer_scale can be used as a workaround, but for fractional scales the application needs to additionally provide a differently sized buffer so that the compositor can scale it down to the proper size (e.g., to display 24 pixels with a scale=1.5 the client would need to provide 32 pixels and set_buffer_scale(2)). This is both more complex for the clients, which need to be able to provide multiple cursor sizes depending on the scale, and can also result in visual degradation due to the extra scaling.

Supporting wp_viewport for cursor surfaces would allow clients to deal with cursor scaling (and especially fractional scaling) in a cleaner and more consistent way."

This merge hitting Mutter Git this week implements the wp_viewport support for cursor surfaces.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week