From d3b348a5b183b0e6295dc985b1d5dcd939cb5c6e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 29 Feb 2024 07:54:27 +0100 Subject: cursor-shape: improve xcursor fallback support, and prefer CSS names Before this patch, we used legacy X11 xcursor names, and didn't really have any fallback handling in place (we only tried to fallback to "xterm", regardless of which cursor shape we were trying to load). This patch changes two things: 1. Improved fallback support. cursor_shape_to_string() now returns a list of strings. This allows us to have per-shape fallbacks, and any number of fallbacks. 2. We prefer CSS xcursor names over legacy X11 names. --- cursor-shape.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cursor-shape.h') diff --git a/cursor-shape.h b/cursor-shape.h index 58755382..110dbd2e 100644 --- a/cursor-shape.h +++ b/cursor-shape.h @@ -9,7 +9,6 @@ enum cursor_shape { CURSOR_SHAPE_LEFT_PTR, CURSOR_SHAPE_TEXT, - CURSOR_SHAPE_TEXT_FALLBACK, CURSOR_SHAPE_TOP_LEFT_CORNER, CURSOR_SHAPE_TOP_RIGHT_CORNER, CURSOR_SHAPE_BOTTOM_LEFT_CORNER, @@ -22,7 +21,7 @@ enum cursor_shape { CURSOR_SHAPE_COUNT, }; -const char *cursor_shape_to_string(enum cursor_shape shape); +const char *const *cursor_shape_to_string(enum cursor_shape shape); enum wp_cursor_shape_device_v1_shape cursor_shape_to_server_shape( enum cursor_shape shape); -- cgit v1.3