aboutsummaryrefslogtreecommitdiff
path: root/cursor-shape.c (unfollow)
Commit message (Collapse)AuthorLines
2024-03-01cursor-shape: improve xcursor fallback support, and prefer CSS namesDaniel Eklöf-17/+14
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.
2024-02-05util: add streq() function and use in place of strcmp(...) == 0Craig Barnes-1/+1
2023-08-07wayland: cursor-shape-v1 is now always availableDaniel Eklöf-4/+0
Since we're requiring wayland-protocols >= 1.32
2023-07-03cursor-shape: use server-side cursors for custom (OSC-22), if possibleDaniel Eklöf-1/+62
Using a lookup table, try to map the user-provided xcursor string to a cursor-shape-v1 known shape. If we succeed, set the user’s custom cursor using server side cursors (i.e. using cursor-shape-v1). If not, fallback to trying to load the image ourselves (using wl_cursor_theme_get_cursor()), and set it using the legacy wl_pointer_set_cursor().
2023-07-03cursor-shape: assert lookup succeededDaniel Eklöf-0/+2
2023-07-03cursor-shape: add support for server side cursor shapesDaniel Eklöf-1/+24
This implements support for the new cursor-shape-v1 protocol. When available, we use it, instead of client-side cursor surfaces, to select the xcursor shape. Note that we still need to keep client side pointers, for: * backward compatibility * to be able to "hide" the cursor Closes #1379
2023-07-03refactor: track current xcursor using an enum, instead of a char pointerDaniel Eklöf-0/+29
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-108/+0
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.