lirios / shell

:shell: Convergent shell for desktops, phones and tables built with QtQuick, Wayland and Material Design
GNU General Public License v3.0
231 stars 15 forks source link

Revamp how the mouse cursor is managed #204

Closed plfiorini closed 3 years ago

plfiorini commented 3 years ago

Sometimes the mouse pointer disappears, for example when it's over the panel. This happens when the pointer is on an element that is created by the server and thus do not have its own pointer. The compositor usually asks the helper process to change cursor but it's not possible to do it in a declarative way, we need to find a clever way to do this.

Here's an idea: when the cursor surface is not available we use the platform cursor from eglfs, otherwise we display the QtQuick pointer, but eglfs loads an xdg cursor theme instead of using the cursor atlas. When a cursor surface is updated we should convert the buffer as an image and create a bitmap cursor and remove the WaylandCursorItem: the cursor will only be drawn by the platform plugin.