Skip to content

Commit 1b0464e

Browse files
committed
Hack for X11 compatibility
1 parent 3fe1b7a commit 1b0464e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/keymap.h

+2
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,14 @@ enum mod_type {
121121

122122
/* Count of real modifiers */
123123
#define MOD_REAL_MAX 13
124+
#define MOD_REAL_MAX_X11 8
124125

125126
/* Ensure we can encode the modifier mask in xkb_mod_mask_t */
126127
_Static_assert(MOD_REAL_MAX <= XKB_MAX_MODS);
127128

128129
/* Mask for all real modifiers */
129130
#define MOD_REAL_MASK_ALL ((xkb_mod_mask_t) ((1u << MOD_REAL_MAX) - 1))
131+
#define MOD_REAL_MASK_ALL_X11 ((xkb_mod_mask_t) ((1u << MOD_REAL_MAX_X11) - 1))
130132

131133
enum xkb_action_type {
132134
ACTION_TYPE_NONE = 0,

src/text.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ ModMaskText(struct xkb_context *ctx, const struct xkb_mod_set *mods,
269269
if (mask == 0)
270270
return "none";
271271

272-
if (mask == MOD_REAL_MASK_ALL)
272+
if (mask == MOD_REAL_MASK_ALL ||
273+
mask == MOD_REAL_MASK_ALL_X11 /* hack for X11 compatibility */)
273274
return "all";
274275

275276
xkb_mods_enumerate(i, mod, mods) {

0 commit comments

Comments
 (0)