wayland: Sanity check cursor image size
authorMatthias Clasen <mclasen@redhat.com>
Fri, 27 May 2022 02:28:57 +0000 (22:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 27 May 2022 10:59:10 +0000 (06:59 -0400)
commitc543206d791977b921a7952bb3cc4c65d9d29958
treee92ec45d3d8f6b15190981dee4f853a5c0159d53
parent3523b02a350a888a62da125981dad98bc575b627
wayland: Sanity check cursor image size

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, 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.
gdk/wayland/gdkcursor-wayland.c