Add support for LIBINPUT_LED_COMPOSE/LIBINPUT_LED_KANA

Added in libinput 1.26

Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput/-/merge_requests/58>
This commit is contained in:
Martin Rys
2024-09-03 14:11:52 +02:00
committed by Peter Hutterer
parent 3a33984cce
commit 0bcb60e744
2 changed files with 12 additions and 4 deletions

View File

@@ -65,6 +65,9 @@ if cc.has_function('libinput_device_config_click_set_clickfinger_button_map',
dependencies: dep_libinput)
config_h.set('HAVE_LIBINPUT_CLICKFINGER_BUTTON_MAP', 1)
endif
if cc.has_header_symbol('libinput.h', 'LIBINPUT_LED_COMPOSE')
config_h.set('HAVE_LIBINPUT_COMPOSE_AND_KANA', 1)
endif
dir_headers = get_option('sdkdir')
if dir_headers == ''

View File

@@ -1170,14 +1170,19 @@ xf86libinput_init_pointer_absolute(InputInfoPtr pInfo)
static void
xf86libinput_kbd_ctrl(DeviceIntPtr device, KeybdCtrl *ctrl)
{
#define CAPSFLAG 1
#define NUMFLAG 2
#define SCROLLFLAG 4
#define CAPSFLAG 1
#define NUMFLAG 2
#define SCROLLFLAG 4
#define COMPOSEFLAG 8
#define KANAFLAG 16
static struct { int xbit, code; } bits[] = {
{ CAPSFLAG, LIBINPUT_LED_CAPS_LOCK },
{ NUMFLAG, LIBINPUT_LED_NUM_LOCK },
{ SCROLLFLAG, LIBINPUT_LED_SCROLL_LOCK },
#ifdef HAVE_LIBINPUT_COMPOSE_AND_KANA
{ COMPOSEFLAG, LIBINPUT_LED_COMPOSE },
{ KANAFLAG, LIBINPUT_LED_KANA },
#endif
{ 0, 0 },
};
int i = 0;