Arch linux build broken due to libinput updates in wlroots code.
Hey, just a quick note for you guys, Arch linux just pushed an updated version of libinput, and https://archlinux.org/packages/extra/x86_64/libinput/ and it appears to have broken the build of gamescope, and other projects based on wlroots, specificly this code:
switch (libinput_event_switch_get_switch(sevent)) {
case LIBINPUT_SWITCH_LID:
wlr_event.switch_type = WLR_SWITCH_TYPE_LID;
break;
case LIBINPUT_SWITCH_TABLET_MODE:
wlr_event.switch_type = WLR_SWITCH_TYPE_TABLET_MODE;
break;
}
- https://github.com/misyltoad/wlroots/blob/0ebfe13ccb984835501e517dd961fe1f144342f8/backend/libinput/switch.c#L36-L43
that now has been updated for the struct to include LIBINPUT_SWITCH_KEYPAD_SLIDE -
/**
* @ingroup device
*
* The type of a switch.
*
* @since 1.7
*/
enum libinput_switch {
/**
* The laptop lid was closed when the switch state is @ref
* LIBINPUT_SWITCH_STATE_ON, or was opened when it is @ref
* LIBINPUT_SWITCH_STATE_OFF.
*/
LIBINPUT_SWITCH_LID = 1,
/**
* This switch indicates whether the device is in normal laptop mode
* or behaves like a tablet-like device where the primary
* interaction is usually a touch screen. When in tablet mode, the
* keyboard and touchpad are usually inaccessible.
*
* If the switch is in state @ref LIBINPUT_SWITCH_STATE_OFF, the
* device is in laptop mode. If the switch is in state @ref
* LIBINPUT_SWITCH_STATE_ON, the device is in tablet mode and the
* keyboard or touchpad may not be accessible.
*
* It is up to the caller to identify which devices are inaccessible
* in tablet mode.
*/
LIBINPUT_SWITCH_TABLET_MODE,
/**
* This switch indicates if the device keypad is exposed or not.
*
* If the switch is in state @ref LIBINPUT_SWITCH_STATE_OFF, the
* keypad is hidden. If the state is @ref LIBINPUT_SWITCH_STATE_ON,
* the keypad is exposed.
*
* All devices will remain accessible regardless of the state of this
* switch.
*
* @since 1.31
*/
LIBINPUT_SWITCH_KEYPAD_SLIDE,
};
- https://gitlab.freedesktop.org/libinput/libinput/-/blob/659967488e1e66d7fb7210c6b86860c8e1e5bed4/src/libinput.h
This has already been shown in gamescope by this github action - https://github.com/ValveSoftware/gamescope/actions/runs/23454135923/job/68238734994
This needs to be fixed soon as it will affect more systems into the future. I am leaving an issue here and will be making a PR for adding a default handling in the wlroots version you use in a few minutes to hours.
Hello @davidawesome02-backup, this issue is already being tracked at #2110. Closing as a duplicate.