From fb86ed6b0588dfdebfb66ce875bc63cfa0a897f6 Mon Sep 17 00:00:00 2001 From: Reza Jelveh Date: Mon, 15 Apr 2024 13:39:41 +0800 Subject: feat: 1.9 merge (#277) Co-authored-by: William McKinnon Co-authored-by: Erik Reider <35975961+ErikReider@users.noreply.github.com> --- sway/input/tablet.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sway/input/tablet.c') diff --git a/sway/input/tablet.c b/sway/input/tablet.c index 884eba74..902cb7ed 100644 --- a/sway/input/tablet.c +++ b/sway/input/tablet.c @@ -1,6 +1,6 @@ #define _POSIX_C_SOURCE 200809L #include -#include +#include #include #include #include @@ -9,6 +9,10 @@ #include "sway/input/seat.h" #include "sway/input/tablet.h" +#if WLR_HAS_LIBINPUT_BACKEND +#include +#endif + static void handle_pad_tablet_destroy(struct wl_listener *listener, void *data) { struct sway_tablet_pad *pad = wl_container_of(listener, pad, tablet_destroy); @@ -54,15 +58,14 @@ void sway_configure_tablet(struct sway_tablet *tablet) { tablet->seat_device->input_device->wlr_device; struct sway_seat *seat = tablet->seat_device->sway_seat; - if ((seat->wlr_seat->capabilities & WL_SEAT_CAPABILITY_POINTER) == 0) { - seat_configure_xcursor(seat); - } + seat_configure_xcursor(seat); if (!tablet->tablet_v2) { tablet->tablet_v2 = wlr_tablet_create(server.tablet_v2, seat->wlr_seat, device); } +#if WLR_HAS_LIBINPUT_BACKEND /* Search for a sibling tablet pad */ if (!wlr_input_device_is_libinput(device)) { /* We can only do this on libinput devices */ @@ -87,6 +90,7 @@ void sway_configure_tablet(struct sway_tablet *tablet) { break; } } +#endif } void sway_tablet_destroy(struct sway_tablet *tablet) { @@ -287,6 +291,7 @@ void sway_configure_tablet_pad(struct sway_tablet_pad *tablet_pad) { tablet_pad->ring.notify = handle_tablet_pad_ring; wl_signal_add(&tablet_pad->wlr->events.ring, &tablet_pad->ring); +#if WLR_HAS_LIBINPUT_BACKEND /* Search for a sibling tablet */ if (!wlr_input_device_is_libinput(wlr_device)) { /* We can only do this on libinput devices */ @@ -311,6 +316,7 @@ void sway_configure_tablet_pad(struct sway_tablet_pad *tablet_pad) { break; } } +#endif } void sway_tablet_pad_destroy(struct sway_tablet_pad *tablet_pad) { -- cgit v1.2.3