wayland: Support the cursor-shape protocol

If present, use the cursor-shape protocol instead of manually
updating a pointer surface. This commit supports both v1 of the
protocol and the (still unmerged) v2 additions to the enumeration.

This was tested with both kwin and mutter.

(cherry picked from commit a63d6d1dc7a8ebdf61c682196f89917846cbe8ac)
This commit is contained in:
Matthias Clasen
2025-02-27 15:25:29 -05:00
committed by Vlad Zahorodnii
parent cc14115d09
commit b281c8035f
7 changed files with 305 additions and 11 deletions

View File

@ -89,6 +89,8 @@ gboolean _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
void gdk_wayland_display_system_bell (GdkDisplay *display,
GdkWindow *window);
const char *_gdk_wayland_cursor_get_name (GdkCursor *cursor);
struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
guint image_index,
int *hotspot_x,