mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-13 04:27:56 -05:00
backend/libinput: fix build with libinput 1.31
This commit is contained in:
parent
436bcf9a47
commit
c1452d8811
2 changed files with 9 additions and 0 deletions
|
|
@ -29,3 +29,7 @@ features += { 'libinput-backend': true }
|
|||
wlr_deps += libinput
|
||||
|
||||
internal_config.set10('HAVE_LIBINPUT_BUSTYPE', libinput.version().version_compare('>=1.26.0'))
|
||||
internal_config.set10(
|
||||
'HAVE_LIBINPUT_SWITCH_KEYPAD_SLIDE',
|
||||
libinput.version().version_compare('>=1.30.901')
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue