Skip to content

wayland/cursor: Sanity check cursor image size

Robert Mader requested to merge rmader/gtk:wayland-cursor-size into gtk-3-24

On Wayland it is a protocol violation to upload buffers with dimensions that are not an integer multiple of the buffer scale.

Until recently, Mutter did not enforce this. When it started doing so (mutter!2188 (merged)), some users started seeing crashes in GTK apps because the cursor theme ended up with e.g. a 15x16 pixel image at scale of 2.

Add a small sanity check for this case.


cc @jadahl, @vanvugt

Note:

  • I haven't digged deep into the issue and this is a bug somewhere else. Potentially related: a907552d.
  • I wasn't yet able to reproduce the issue, so this is pending confirmation from affected users.
  • I'll open a GTK4 forward port once this got reviewed.
Edited by Robert Mader

Merge request reports