summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* compose: drop the 65535 node limit (#343)HEADmasteralois312023-05-153-10/+11
| | | | | | | | | | | In commit 1638409b22aef33d487863876ab214b949db4984, the number of compose nodes was limited to 65535 to enable "future optimizations", which apparently means slightly reduced memory usage due to fitting in a uint16_t. At this time, it was mentioned that the author was not aware of "any compose files which come close". However, I'm one of the users that actually do require a larger number of nodes for their compose file. Thus, use a uint32_t again and raise the limit significantly.
* Add support for stable doc URLs (#342)Wismill2023-05-145-4/+318
| | | | | | | | | | | | | | | | | | | | | | Doc URLs may change with time because they depend on Doxygen machinery. This is unfortunate because it is good practice to keep valid URLs (see: https://www.w3.org/Provider/Style/URI.html). I could not find a built-in solution in Doxygen, so the solution proposed here is to maintain a registry of all URLs and manage legacy URLs as redirections to their canonical page. This commit adds a registry of URLs that has three functions: - Check no previous URL is now invalid. - Add aliases for moved pages. - Generate redirection pages for aliases. The redirection works with a simple <meta http-equiv="refresh"> HTML tag. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv This commit also initialize the URLs registry with current pages and some redirections needed after recent documentation refactoring. Finally, the CI is updated to catch any change that invalidate previous URLs.
* Improve documentationPierre Le Marre2023-05-1310-74/+469
| | | | | | - Add introduction to XKB - Embrace Doxygen features - More cross links
* Do not interpret nor emit invalid Unicode encoding formsPierre Le Marre2023-05-134-5/+33
| | | | | | Surrogates are invalid in both UTF-32 and UTF-8. See https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G28875 and https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G31703
* Add warning when RMLVO with no layout but variant setPierre Le Marre2023-05-131-0/+10
| | | | | | There is no feedback that they are both replaced with default values. Fix it by adding a warning informing about missing layout and show the defaults for both.
* ci: bump runs-on versionsRan Benita2023-05-124-7/+8
| | | | | | Mostly to bump to macos one which will hopefully fix CI issues there. Signed-off-by: Ran Benita <ran@unusedvar.com>
* utils: fix printf format warnings on mingwRan Benita2023-05-061-1/+3
| | | | | | | | | See: https://github.com/mesonbuild/wrapdb/pull/819 https://github.com/Exiv2/exiv2/blob/c86ae6acf597304db37246434ebc393d732c22c2/src/image_int.hpp#L15 https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/ Signed-off-by: Ran Benita <ran@unusedvar.com>
* ci/windows: use the vs backend instead of ninja backendRan Benita2023-05-051-5/+1
| | | | | | So we have some coverage of that. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: show a summaryRan Benita2023-05-051-0/+34
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: require bison >= 2.3aRan Benita2023-05-051-1/+1
| | | | | | | | At least 2.3 (released 2006) which is the version shipped with macos doesn't work. Reading the changelog I think 2.3a *should* work, so require that. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: bump required meson to 0.52.0Ran Benita2023-05-051-1/+1
| | | | | | Support for version checks in `find_program()`. Signed-off-by: Ran Benita <ran@unusedvar.com>
* scanner: allow for a zero terminated string as keymapPeter Hutterer2023-05-052-18/+26
| | | | | | | | | | | As the documentation for xkb_keymap_new_from_buffer() states, the "input string does not have to be zero-terminated". The actual implementation however failed with "unrecognized token/syntax error" when it encountered a null byte. Fix this by allowing a null byte at the last position of the buffer. Anything else is likely a client error anyway. Fixes #307
* README: use meson compile/test over ninjaPeter Hutterer2023-05-052-4/+4
| | | | | | | | This is backend-agnostic and the recommended way to invoke compilation. This requires meson 0.55 (July 2020) and we only require 0.51 but at this point I'm expecting most users who require the README instructions will have a recent-enough meson anyway.
* .editorconfig: add .md configPierre Le Marre2023-05-041-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Use consistent indentation for map and CSS filesRan Benita2023-05-044-157/+157
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* registry: remove a few asprintf/free() calls with snprintfPeter Hutterer2023-05-041-13/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* registry: simplify strdup() error handlingPeter Hutterer2023-05-041-12/+8
| | | | | | | strdup() is the least likely call to fail here, let's move it to the bottom so we don't need to worry about the allocated string. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: register libxkbcommon.dylib linkKen Cunningham2023-05-041-0/+1
| | | | | | | meson needs to know that the executable tools link against libxkbcommon.dylib so that the @rpath references used during the build/test phases can be rewritten to full path names on install
* Add support for modmap None (#291)Wismill2023-05-018-9/+344
| | | | | | | | | | | | | | | | | | | 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.
* Improve the doc of the XKB keymap text format, V1 (#321)Wismill2023-04-305-91/+932
| | | | | | | | | | | - Add table of contents - Add terminology section - (WIP) Add Introduction to the format - Improve the keycode section - Improve the interpret section - Add guide to create and use modifiers - (WIP) Add actions documentation - Add cross-references - Add keysyms header to documentation
* keysyms: add new keysyms XF86EmojiPicker, XF86DictateRan Benita2023-04-122-862/+869
| | | | | | Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/914d8f5e0f469cd0416364dd008e9eea752bf703 Ref: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/commit/a839f0c7fc5596d10e786394d3b0953eb8a1731b Signed-off-by: Ran Benita <ran@unusedvar.com>
* Possible fix for non-MSVC windows compilersRan Benita2023-04-116-9/+9
| | | | | | | | `_MSC_VER` is specific to MSVC, but there can be other compilers targeting windows. Hopefully they do define `_WIN32`, so let's use that. Refs: https://github.com/xkbcommon/libxkbcommon/issues/305 Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym: replace deprecated Serbian_DZE with Cyrillic_DZHEPeter Hutterer2023-03-311-2/+2
| | | | | | | | | Same numeric value for both and the Serbian one has been listed as deprecated for decades. See https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/69#note_1843415 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* build: override dependency for use as subprojectSimon Ser2023-02-191-0/+9
| | | | | | This allows xkbcommon to be used as a subproject. Signed-off-by: Simon Ser <contact@emersion.fr>
* NEWS: add "New API" section for last releaseRan Benita2023-01-021-0/+3
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.5.0xkbcommon-1.5.0Ran Benita2023-01-022-1/+28
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: fix wayland-scanner deprecation code -> private-codeRan Benita2023-01-021-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* doc: clarify "server state" and "client state" distinctionRan Benita2022-12-171-21/+42
| | | | | | | Add a common page for the concept and link to there from the relevant functions. Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: require meson >= 0.51, fix meson deprecationsRan Benita2022-12-161-16/+16
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* ci: don't run linux on push to non-master branchesRan Benita2022-12-161-1/+5
| | | | | | It's redundant with the pull request run. Signed-off-by: Ran Benita <ran@unusedvar.com>
* context: add XKB_CONTEXT_NO_SECURE_GETENV flag (#312)Ronan Pigott2022-12-1611-53/+97
| | | | | | | | | This flag is useful for clients that may have relatively benign capabilities set, like CAP_SYS_NICE, that also want to use the xkb configuration from the environment and user configs in XDG_CONFIG_HOME. Fixes: https://github.com/xkbcommon/libxkbcommon/issues/308 Fixes: https://github.com/xkbcommon/libxkbcommon/issues/129 Signed-off-by: Ran Benita <ran@unusedvar.com>
* build: remove -fsanitize-undefined-trap-on-errorRan Benita2022-12-141-1/+0
| | | | | | | | | Meson complains; it's probably not that important anymore when using the `-Db_sanitize` options. meson.build:36: WARNING: Consider using the built-in option for sanitizers instead of using "-fsanitize-undefined-trap-on-error". Signed-off-by: Ran Benita <ran@unusedvar.com>
* CI: bump a few actions to newer versionsPeter Hutterer2022-12-144-7/+7
| | | | | | Node 12 is deprecated so let's bump the actions to newer versions that use Node 16. See https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
* build: reenable test-context in MSVCRan Benita2022-09-241-8/+5
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: move mkdir & mkdtemp calls to common place and fix them on MSVCRan Benita2022-09-245-24/+63
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* utils: move some MSVC compat stuff to common placeRan Benita2022-09-243-23/+13
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* ci/linux: store the test logs as artifacts on failurePeter Hutterer2022-09-241-0/+7
| | | | | | This makes debugging a lot easier than having to reproduce locally. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* ci/linux: split normal testing from valgrind testingPeter Hutterer2022-09-241-0/+3
| | | | | | | | A test case failure usually also triggers valgrind leaks, sifting through those to find the actual test failure is painful. So let's separate the tests and run them separately. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* interactive-wayland: Fix interface versioningJan Alexander Steffens (heftig)2022-09-241-5/+5
| | | | | | | | We need to request the lower version of the interface versions we support and the server supports, not the higher version. Using the higher version caused crashes due to unbound callbacks on GNOME, which supports a higher version of `xdg_wm_base`.
* Bump version to 1.4.1xkbcommon-1.4.1Ran Benita2022-05-212-1/+15
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym-utf: remove bogus currency sign entriesRan Benita2022-05-151-11/+0
| | | | | | | | | | | | | | | | | | | | | | These ended up being mapping in the 0x100xxxx Unicode range, which are handled automatically ; these special keysyms don't exist (except for EuroSign). #define XKB_KEY_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */ #define XKB_KEY_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */ #define XKB_KEY_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */ #define XKB_KEY_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */ #define XKB_KEY_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */ #define XKB_KEY_MillSign 0x10020a5 /* U+20A5 MILL SIGN */ #define XKB_KEY_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */ #define XKB_KEY_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */ #define XKB_KEY_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */ #define XKB_KEY_WonSign 0x10020a9 /* U+20A9 WON SIGN */ #define XKB_KEY_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */ #define XKB_KEY_DongSign 0x10020ab /* U+20AB DONG SIGN */ #define XKB_KEY_EuroSign 0x20ac /* U+20AC EURO SIGN */ Signed-off-by: Ran Benita <ran@unusedvar.com>
* keysym-utf: remove bogus Korean Won sign entryRan Benita2022-05-151-1/+0
| | | | | | | This entry maps a non existing special keysym 0x20a9. The correct mapping for XKB_KEY_Korean_Won (0x0eff) already exists. Signed-off-by: Ran Benita <ran@unusedvar.com>
* Remove bogus euro sign entry from keysymtabSam Lantinga2022-05-152-1/+1
| | | | | | | | | | | | Not sure what it's doing here, but converting "€" to a keysym doesn't work with this entry. 0x13a4 doesn't appear in xkbcommon-keysyms.h. 0x20ac is the keysym documented in the header (and it's the last entry in the table). It's been in the table since it was introduced in e0524296d2e0 ("Add API for getting unicode representation of a keysym"). Co-authored-by: Simon Ser <contact@emersion.fr>
* Do not clear sibling entries when override.Weng Xuetian2022-05-152-1/+22
| | | | | | | | | | lokid and hikid actually stores the sibling to current node, which should not be cleared when override. This would break the sequence with a common prefix when override another. Fix #286 Signed-off-by: Weng Xuetian <wengxt@gmail.com>
* ci/linux: bring back `apt update` to fix `apt install` 404sRan Benita2022-03-201-0/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* scanner: prefix functions with `scanner_` to avoid symbol conflictsRan Benita2022-03-144-151/+151
| | | | | | | | Particularly `eof()` in mingw-w64. Fixes: https://github.com/xkbcommon/libxkbcommon/pull/285 Reported-by: Marko Lindqvist Signed-off-by: Ran Benita <ran@unusedvar.com>
* Improve misleading comments #270Mladen Milinkovic2022-02-241-1/+2
|
* ci: another possible fix for release workflowRan Benita2022-02-041-1/+1
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* Bump version to 1.4.0xkbcommon-1.4.0Ran Benita2022-02-042-1/+27
| | | | Signed-off-by: Ran Benita <ran@unusedvar.com>
* test: add test for variant inheritance of ISO 639/3166 codesPeter Hutterer2022-02-041-0/+20
| | | | See efa99624320f54e6e1ff24e4c4b1fcecdfba43d5