After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752342 - Implement compositor-side animated cursors
Implement compositor-side animated cursors
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-13 18:44 UTC by Carlos Garnacho
Modified: 2015-07-20 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backend: Store XcursorImages for theme cursors (4.73 KB, patch)
2015-07-13 18:45 UTC, Carlos Garnacho
accepted-commit_now Details | Review
backend: Add meta_cursor_renderer_force_update() (1.72 KB, patch)
2015-07-13 18:45 UTC, Carlos Garnacho
accepted-commit_now Details | Review
backends: Trigger animated cursor animations on the native backend (3.60 KB, patch)
2015-07-13 18:45 UTC, Carlos Garnacho
none Details | Review
backends: Trigger animated cursor animations on the native backend (3.57 KB, patch)
2015-07-13 20:49 UTC, Carlos Garnacho
accepted-commit_now Details | Review

Description Carlos Garnacho 2015-07-13 18:44:24 UTC
On the places where gnome-shell manages the cursor and has to show an animated one (eg. after launching an app), the cursor is static.

I'm attaching some patches to make mutter theme cursors load the several images, and make the native backend trigger the cursor animations.
Comment 1 Carlos Garnacho 2015-07-13 18:45:23 UTC
Created attachment 307361 [details] [review]
backend: Store XcursorImages for theme cursors

There's a chance the icon will be animated, so store the XcursorImages
instead of the individual XcursorImage, and handle that as a nimages=1
special case.

API to "tick" a cursor animation, and retrieve current frame timing
information has been added.
Comment 2 Carlos Garnacho 2015-07-13 18:45:28 UTC
Created attachment 307362 [details] [review]
backend: Add meta_cursor_renderer_force_update()

There will be times where additional updates will be needed, such
as animated cursors. We should update the texture and redraw in
that case.
Comment 3 Carlos Garnacho 2015-07-13 18:45:33 UTC
Created attachment 307363 [details] [review]
backends: Trigger animated cursor animations on the native backend

We will need to update the timeout on either cursor changes, or
right when ticking to the next cursor frame.
Comment 4 Carlos Garnacho 2015-07-13 20:49:33 UTC
Created attachment 307368 [details] [review]
backends: Trigger animated cursor animations on the native backend

We will need to update the timeout on either cursor changes, or
right when ticking to the next cursor frame.
Comment 5 Rui Matos 2015-07-20 16:20:02 UTC
Review of attachment 307368 [details] [review]:

looks good
Comment 6 Rui Matos 2015-07-20 16:20:11 UTC
Review of attachment 307362 [details] [review]:

fine
Comment 7 Rui Matos 2015-07-20 16:20:32 UTC
Review of attachment 307361 [details] [review]:

looks good otherwise

::: src/backends/meta-cursor-private.h
@@ +33,3 @@
 
+typedef struct _MetaCursorAnimation MetaCursorAnimation;
+

unused. leftover?
Comment 8 Carlos Garnacho 2015-07-20 20:03:46 UTC
(In reply to Rui Matos from comment #7)
> Review of attachment 307361 [details] [review] [review]:
> 
> looks good otherwise
> 
> ::: src/backends/meta-cursor-private.h
> @@ +33,3 @@
>  
> +typedef struct _MetaCursorAnimation MetaCursorAnimation;
> +
> 
> unused. leftover?

It indeed is :), removing and pushing.
Comment 9 Carlos Garnacho 2015-07-20 20:07:26 UTC
Attachment 307361 [details] pushed as 1417600 - backend: Store XcursorImages for theme cursors
Attachment 307362 [details] pushed as 74ca936 - backend: Add meta_cursor_renderer_force_update()
Attachment 307368 [details] pushed as 8329e97 - backends: Trigger animated cursor animations on the native backend