From 7e0bd38887223e4e868decbc3bbb1ce3eb548538 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 13 Sep 2020 21:52:59 -0700 Subject: [PATCH] Quick fix to support libxkbcommon >= 1.0. The next step will be to use the "real" function when a libxkbcommon version is found rather than the compat version. Fix #3168 --- luaa.c | 4 ++-- xkb_utf32_to_keysym.c => xkb_utf32_to_keysym_compat.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename xkb_utf32_to_keysym.c => xkb_utf32_to_keysym_compat.c (99%) diff --git a/luaa.c b/luaa.c index aeaba9cd..66c331aa 100644 --- a/luaa.c +++ b/luaa.c @@ -77,7 +77,7 @@ #include #include -#include "xkb_utf32_to_keysym.c" +#include "xkb_utf32_to_keysym_compat.c" #include /* for gethostname() */ @@ -489,7 +489,7 @@ luaA_get_key_name(lua_State *L) keysym = keysyms[0]; } else if ((ucs = one_utf8_to_utf32(input, length)) > 0) //syntax #2 - keysym = xkb_utf32_to_keysym(ucs); + keysym = xkb_utf32_to_keysym_compat(ucs); else //syntax #3 keysym = xkb_keysym_from_name(input, XKB_KEYSYM_NO_FLAGS); diff --git a/xkb_utf32_to_keysym.c b/xkb_utf32_to_keysym_compat.c similarity index 99% rename from xkb_utf32_to_keysym.c rename to xkb_utf32_to_keysym_compat.c index b635ff16..8e036082 100644 --- a/xkb_utf32_to_keysym.c +++ b/xkb_utf32_to_keysym_compat.c @@ -839,7 +839,7 @@ static const struct codepair keysymtab[] = { { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ }; -static xkb_keysym_t xkb_utf32_to_keysym(uint32_t ucs) +static xkb_keysym_t xkb_utf32_to_keysym_compat(uint32_t ucs) { /* first check for Latin-1 characters (1:1 mapping) */ if ((ucs >= 0x0020 && ucs <= 0x007e) ||