diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-06-27 16:40:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-03 12:36:32 +0000 |
| commit | ddd6004b275dd9a24f26e03dead90f0fffb0cc3e (patch) | |
| tree | 8cb3b31121a5e5a690ccbbd205642bbfbe3eef4a /render.c | |
| parent | cursor-shape: assert lookup succeeded (diff) | |
render: don’t (can’t) use cursor-shape-v1 when user has set a custom cursor
Well, we _could_, but we’d have to reverse map the string to a
cursor-shape-v1 enum value. Let’s not do that, for now at least.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -4271,7 +4271,9 @@ render_xcursor_update(struct seat *seat) xassert(seat->pointer.cursor != NULL); #if defined(HAVE_CURSOR_SHAPE) - if (seat->pointer.shape_device != NULL) { + if (seat->pointer.shape_device != NULL && + seat->pointer.shape != CURSOR_SHAPE_CUSTOM) + { LOG_DBG("setting cursor shape using cursor-shape-v1"); wp_cursor_shape_device_v1_set_shape( seat->pointer.shape_device, @@ -4449,7 +4451,8 @@ render_refresh_urls(struct terminal *term) } bool -render_xcursor_set(struct seat *seat, struct terminal *term, enum cursor_shape shape) +render_xcursor_set(struct seat *seat, struct terminal *term, + enum cursor_shape shape) { if (seat->pointer.theme == NULL) return false; @@ -4469,7 +4472,9 @@ render_xcursor_set(struct seat *seat, struct terminal *term, enum cursor_shape s /* TODO: skip this when using server-side cursors */ if (shape != CURSOR_SHAPE_HIDDEN) { - const char *const xcursor = cursor_shape_to_string(shape); + const char *const xcursor = shape == CURSOR_SHAPE_CUSTOM + ? term->mouse_user_cursor + : cursor_shape_to_string(shape); const char *const fallback = cursor_shape_to_string(CURSOR_SHAPE_TEXT_FALLBACK); |
