Skip to content

Draft: Implement paintable cursors

Matthias Clasen requested to merge cursor-from-paintable into main

This is an attempt to make gdk_cursor_from_paintable() work.

We use the intrinsic size of the paintable as the cursor size, and we render the paintable scaled by the scale for the monitor we're on.

If viewporters work for pointer surfaces, we can use a viewporter to render a crisp cursor, even at fractional scales. Otherwise, we are restricted to integral scale factors and buffer scale.

We can also support animated cursors, by connecting to invalidate-contents.

The X11 implementation doesn't support either scales or animation. Windows, macOS and broadway aren't done.

Edited by Matthias Clasen

Merge request reports