diff options
author | xdavidwu <xdavidwuph@gmail.com> | 2019-08-31 20:42:08 +0800 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-31 23:12:33 +0900 |
commit | afde6369b83d668084f11cbbffbda29ae68c74e0 (patch) | |
tree | b27b884cae89fee1ce2074a279982c2d989b5402 | |
parent | 3dcfa2ee90d6528c612227667279ad8bc1b57cad (diff) |
seat: avoid unneeded reloading xcursor theme
Load xcursor theme on configuring pointer or tablet tool only if
there was no pointer cap before.
-rw-r--r-- | sway/input/seat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index a4118a18..6a899124 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -593,7 +593,9 @@ static void seat_apply_input_config(struct sway_seat *seat, static void seat_configure_pointer(struct sway_seat *seat, struct sway_seat_device *sway_device) { - seat_configure_xcursor(seat); + if ((seat->wlr_seat->capabilities & WL_SEAT_CAPABILITY_POINTER) == 0) { + seat_configure_xcursor(seat); + } wlr_cursor_attach_input_device(seat->cursor->cursor, sway_device->input_device->wlr_device); seat_apply_input_config(seat, sway_device); @@ -633,7 +635,9 @@ static void seat_configure_touch(struct sway_seat *seat, static void seat_configure_tablet_tool(struct sway_seat *seat, struct sway_seat_device *sway_device) { - seat_configure_xcursor(seat); + if ((seat->wlr_seat->capabilities & WL_SEAT_CAPABILITY_POINTER) == 0) { + seat_configure_xcursor(seat); + } wlr_cursor_attach_input_device(seat->cursor->cursor, sway_device->input_device->wlr_device); seat_apply_input_config(seat, sway_device); |