Add support for animated cursors
There are two kinds of animated cursors: ones coming from clients and ones coming from kwin. Client animated cursors work as expected because clients continuously push new buffers. Server-side animated cursors are not implemented. This change adds missing support for animated cursors in kwin itself.
This patch series introduces CursorSource
. It acts as the source of whatever the cursor represents. BitmapCursorSource
shows a static image, it's reused by client cursors. ThemeCursorSource
shows a cursor from an Xcursor theme. If the given cursor shape has more than one sprite, it will start a timer. When the timer expires, it will switch to the next sprite, and so on.
Follow-up tasks:
- Kill
Cursors
. Since cursor contents is well encapsulated by usingCursorSource
, we can drop support for multiple cursors and let pointer and tablet input override cursor position and contents. FTRCursors
doesn't really support true multiple cursors, kwin still shows at most one cursor at a time.
Edited by Vlad Zahorodnii