aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-02-07 01:52:58 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-02-11 10:22:53 -0500
commit32f790bd15e1a96f214ac2783bf66837dc0e9682 (patch)
tree8628735f74dd5cd446745a9a937c3fd5c40845c6
parentload_main_config: use given path, store realpath (diff)
downloadsway-32f790bd15e1a96f214ac2783bf66837dc0e9682.tar.gz
sway-32f790bd15e1a96f214ac2783bf66837dc0e9682.tar.zst
sway-32f790bd15e1a96f214ac2783bf66837dc0e9682.zip
seat_configure_tablet_tool: configure xcursor
Since a tablet tool provides the WL_SEAT_CAPABILITY_POINTER capability, sway will attempt to use the xcursor manager to set a cursor image. If the tablet tool was the first (and possibly only) device to provide the capability for the seat, the xcursor manager was not being configured before attempting to set a cursor image. This was due to `seat_configure_xcursor` only being called in `seat_configure_pointer`. Since the xcursor manager was NULL in this case, it would cause a segfault when attempting to set a cursor image. This adds a call to `seat_configure_xcursor` in `seat_configure_tablet_tool` to ensure that the seat has a xcursor manager.
-rw-r--r--sway/input/seat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index d159da22..18664d7c 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -525,6 +525,7 @@ static void seat_configure_touch(struct sway_seat *seat,
525 525
526static void seat_configure_tablet_tool(struct sway_seat *seat, 526static void seat_configure_tablet_tool(struct sway_seat *seat,
527 struct sway_seat_device *sway_device) { 527 struct sway_seat_device *sway_device) {
528 seat_configure_xcursor(seat);
528 wlr_cursor_attach_input_device(seat->cursor->cursor, 529 wlr_cursor_attach_input_device(seat->cursor->cursor,
529 sway_device->input_device->wlr_device); 530 sway_device->input_device->wlr_device);
530 seat_apply_input_config(seat, sway_device); 531 seat_apply_input_config(seat, sway_device);