prefer XKB_MOD_NAME_MOD4 where defined, fall back to XKB_MOD_NAME_LOGO
xkbcommon >= 1.7 removed the modern Mod4 macro and keeps only the legacy deprecated name, so follow d8f6e39's swap but probe the header first to avoid baking in the deprecated spelling on newer xkbcommon.
This commit is contained in:
parent
d8f6e39a68
commit
e206e8433a
1 changed files with 10 additions and 1 deletions
|
|
@ -45,6 +45,15 @@
|
|||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
/* xkbcommon 1.6 renamed/removed the Mod4 macro: >= 1.7 defines only the
|
||||
legacy XKB_MOD_NAME_LOGO (kept for compat), < 1.7 defines the modern
|
||||
XKB_MOD_NAME_MOD4. Prefer the modern name where it exists. */
|
||||
#ifdef XKB_MOD_NAME_MOD4
|
||||
#define XKB_PREFIX_MOD4_NAME XKB_MOD_NAME_MOD4
|
||||
#else
|
||||
#define XKB_PREFIX_MOD4_NAME XKB_MOD_NAME_LOGO
|
||||
#endif
|
||||
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
|
|
@ -3335,7 +3344,7 @@ static void xkb_state_reload(void)
|
|||
return;
|
||||
server.xkb_state = xkb_state_new(server.xkb_keymap);
|
||||
server.xkb_prefix_mod = xkb_keymap_mod_get_index(server.xkb_keymap,
|
||||
tab_prefix == PREFIX_SUPER ? XKB_MOD_NAME_LOGO
|
||||
tab_prefix == PREFIX_SUPER ? XKB_PREFIX_MOD4_NAME
|
||||
: XKB_MOD_NAME_ALT);
|
||||
tabbed_log(TABBED_LOG_DEBUG, "tabbed-wlroots: prefix modifier index=%u "
|
||||
"(%s)\n", (unsigned)server.xkb_prefix_mod,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue