GNOME Bugzilla – Bug 735847
move animatable cursors' current frame info into GdkCursor
Last modified: 2015-11-24 19:56:23 UTC
Currently GdkWaylandDeviceData maintains both the current GdkCursor in use and the current image index to be used during cursor animations, IMO it would be great to move this within the GdkWaylandCursor so it is easier to maintain multiple cursors (as right now is being done for grab/window-under-pointer cursors), and have all of those easily animatable without per-cursor frame counters. gdkdevice-wayland.c still looks anyway like a proper place to maintain the animation itself, as it has knowledge of which cursor applies currently, so I would suggest to have a gdk_wayland_cursor_tick() kind of API, that bumps the image, and a gdk_wayland_cursor_reset_animation() to reset no longer used cursors to the initial frame.
Maybe. Seeing a patch might convince me this is a great idea. Maybe just resetting the image_index to 0 whenever the cursor changes is good enough.
Is this something we still want ?
Created attachment 316199 [details] [review] wayland: Do not store the grab cursor separately After the grab is finished, we would expect an enter event, and GDK updating internally the cursor for that window and device. This means there is no need at all to store it separately in the backend. As a side effect, animated cursors are now also possible on grab icons.
I had this patch in the wip/wayland-tablet branch. This is far nicer in comparison, will push this one.
Review of attachment 316199 [details] [review]: nice
Attachment 316199 [details] pushed as 5f59d7d - wayland: Do not store the grab cursor separately