libxkbcommon/test
Wismill 5b5b67f28c
Add support for modmap None (#291)
Unlike current xkbcommon, X11’s xkbcomp allows to remove entries in
the modifiers’ map using “modifier_map None { … }”.

“None” is translated to the special value “XkbNoModifier” defined in
“X11/extensions/XKB.h”. Then it relies on the fact that in "CopyModMapDef",
the following code:

    1U << entry->modifier

ends up being zero when “entry->modifier” is “XkbNoModifier” (i.e. 0xFF).
Indeed, it relies on the overflow behaviour of the left shift, which in
practice resolves to use only the 5 low bits of the shift amount, i.e.
0x1F here. Then the result of “1U << 0xFF” is cast to “char”, i.e. 0.

This is a good trick but too magical, so in libxkbcommon we will use
an explicit test against our new constant XKB_MOD_NONE.
2023-05-01 23:30:41 +03:00
..
data Add support for modmap None (#291) 2023-05-01 23:30:41 +03:00
atom.c test/atom: use correct format specifier for size_t 2019-12-28 14:13:52 +02:00
buffercomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
common.c Possible fix for non-MSVC windows compilers 2023-04-11 23:29:25 +03:00
compose.c Do not clear sibling entries when override. 2022-05-15 10:07:57 +03:00
context.c test: move mkdir & mkdtemp calls to common place and fix them on MSVC 2022-09-24 12:31:53 +03:00
evdev-scancodes.h test: make most tests portable by copying linux/input.h locally 2014-09-06 11:29:15 +03:00
filecomp.c Add support for modmap None (#291) 2023-05-01 23:30:41 +03:00
keymap.c xkbcomp: where a keysym cannot be resolved, set it to NoSymbol 2020-10-20 09:23:50 +10:00
keyseq.c build: include config.h manually 2019-12-27 13:09:11 +02:00
keysym.c Remove bogus euro sign entry from keysymtab 2022-05-15 10:26:44 +03:00
log.c Only add GCC diagnostic pragmas when compiler is GCC compatible 2019-12-27 15:20:25 +02:00
modifiers.c Add support for modmap None (#291) 2023-05-01 23:30:41 +03:00
registry.c test: move mkdir & mkdtemp calls to common place and fix them on MSVC 2022-09-24 12:31:53 +03:00
rules-file-includes.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rules-file.c build: include config.h manually 2019-12-27 13:09:11 +02:00
rulescomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
state.c test/data: sync from xkeyboard-config 2.30 2020-09-07 11:36:49 +03:00
stringcomp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
symbols-leak-test.py test: make the symbols-leak-test executable 2020-07-25 10:59:32 +03:00
test-keysym.py test: add a keysym tester 2021-02-22 13:43:16 +02:00
test.h Possible fix for non-MSVC windows compilers 2023-04-11 23:29:25 +03:00
tool-option-parsing.py test: show the tool exit status on failure 2022-01-24 07:56:47 +10:00
utf8.c build: include config.h manually 2019-12-27 13:09:11 +02:00
utils.c utils: add streq_null() for streq that allows NULL values 2020-07-06 15:15:20 +10:00
x11.c build: include config.h manually 2019-12-27 13:09:11 +02:00
x11comp.c build: include config.h manually 2019-12-27 13:09:11 +02:00
xkeyboard-config-test.py.in test: add extra info to the layout-tester --help output 2021-04-20 10:30:17 +03:00