mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 14:04:11 +01:00
seat: only show cursor if pointer configured
This commit is contained in:
parent
a032925ae7
commit
dafb0526d7
@ -368,11 +368,20 @@ static void seat_update_capabilities(struct sway_seat *seat) {
|
|||||||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||||
break;
|
break;
|
||||||
case WLR_INPUT_DEVICE_TABLET_TOOL:
|
case WLR_INPUT_DEVICE_TABLET_TOOL:
|
||||||
|
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||||
|
break;
|
||||||
case WLR_INPUT_DEVICE_TABLET_PAD:
|
case WLR_INPUT_DEVICE_TABLET_PAD:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wlr_seat_set_capabilities(seat->wlr_seat, caps);
|
wlr_seat_set_capabilities(seat->wlr_seat, caps);
|
||||||
|
|
||||||
|
// Hide cursor if seat doesn't have pointer capability
|
||||||
|
if ((caps & WL_SEAT_CAPABILITY_POINTER) == 0) {
|
||||||
|
wlr_cursor_set_image(seat->cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
|
||||||
|
} else {
|
||||||
|
cursor_set_image(seat->cursor, "left_ptr", NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void seat_apply_input_config(struct sway_seat *seat,
|
static void seat_apply_input_config(struct sway_seat *seat,
|
||||||
|
Loading…
Reference in New Issue
Block a user