diff options
author | Reza Jelveh <[email protected]> | 2024-04-15 13:39:41 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-15 01:39:41 -0400 |
commit | fb86ed6b0588dfdebfb66ce875bc63cfa0a897f6 (patch) | |
tree | 29857a1769107adc58696f08d379f608aa4e29a2 /sway/input/tablet.c | |
parent | a5e79676c4bd22fc5902182acf0667907202a465 (diff) |
feat: 1.9 merge (#277)
Co-authored-by: William McKinnon <[email protected]>
Co-authored-by: Erik Reider <[email protected]>
Diffstat (limited to 'sway/input/tablet.c')
-rw-r--r-- | sway/input/tablet.c | 14 |
1 files changed, 10 insertions, 4 deletions
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 <stdlib.h> -#include <wlr/backend/libinput.h> +#include <wlr/config.h> #include <wlr/types/wlr_tablet_v2.h> #include <wlr/types/wlr_tablet_tool.h> #include <wlr/types/wlr_tablet_pad.h> @@ -9,6 +9,10 @@ #include "sway/input/seat.h" #include "sway/input/tablet.h" +#if WLR_HAS_LIBINPUT_BACKEND +#include <wlr/backend/libinput.h> +#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) { |