sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit ec5da0ca5bad6a433f727499d68ac1352397f5aa
parent 5a32a74b2d0e4685527bd78d5052aafe2df4b8f2
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Thu,  7 Feb 2019 01:52:58 -0500

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.

Diffstat:
Msway/input/seat.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/sway/input/seat.c b/sway/input/seat.c @@ -525,6 +525,7 @@ 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); wlr_cursor_attach_input_device(seat->cursor->cursor, sway_device->input_device->wlr_device); seat_apply_input_config(seat, sway_device);