backend/libinput: fix build with libinput 1.31

(cherry picked from commit c1452d8811)
This commit is contained in:
Aleksei Bavshin 2026-02-07 17:48:16 -08:00 committed by Simon Zeni
parent 11f5ba8bf2
commit 31dc115b9f
2 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@
#include <libinput.h>
#include <wlr/interfaces/wlr_switch.h>
#include "backend/libinput.h"
#include "config.h"
const struct wlr_switch_impl libinput_switch_impl = {
.name = "libinput-switch",
@ -36,6 +37,10 @@ void handle_switch_toggle(struct libinput_event *event,
case LIBINPUT_SWITCH_TABLET_MODE:
wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE;
break;
#if HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE
case LIBINPUT_SWITCH_KEYPAD_SLIDE:
return;
#endif
}
switch (libinput_event_switch_get_switch_state(sevent)) {
case LIBINPUT_SWITCH_STATE_OFF: