Merge pull request #3171 from Elv13/hack_xkbcommon

Quick fix to support libxkbcommon >= 1.0.
This commit is contained in:
mergify[bot] 2020-09-14 16:58:02 +00:00 committed by GitHub
commit 9d25cfb546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

4
luaa.c
View File

@ -77,7 +77,7 @@
#include <xcb/xcb_atom.h>
#include <xcb/xcb_aux.h>
#include "xkb_utf32_to_keysym.c"
#include "xkb_utf32_to_keysym_compat.c"
#include <unistd.h> /* 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);

View File

@ -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) ||