Commit Graph

2249 Commits (d6a9539e0ca8676ae2e8e379a68671c79cc4fd47)

Author SHA1 Message Date
Sam Lantinga 2536713070 Remove bogus euro sign entry from keysymtab
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 e0524296d2
("Add API for getting unicode representation of a keysym").

Co-authored-by: Simon Ser <contact@emersion.fr>
2022-05-15 10:26:44 +03:00
Weng Xuetian b064b60984 Do not clear sibling entries when override.
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>
2022-05-15 10:07:57 +03:00
Ran Benita 3d56569ab2 ci/linux: bring back `apt update` to fix `apt install` 404s
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-03-20 13:51:14 +02:00
Ran Benita 0b3d90925c scanner: prefix functions with `scanner_` to avoid symbol conflicts
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>
2022-03-14 16:45:19 +02:00
Mladen Milinkovic a2507c0866 Improve misleading comments #270 2022-02-24 12:43:20 +02:00
Ran Benita 9e7f3ba496 ci: another possible fix for release workflow
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-02-04 12:59:18 +02:00
Ran Benita ea6580cc39 Bump version to 1.4.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-02-04 12:41:50 +02:00
Peter Hutterer 1c8ef9e0a5 test: add test for variant inheritance of ISO 639/3166 codes
See efa9962432
2022-02-04 12:30:27 +02:00
M Hickford efa9962432
Variants should inherit iso639, iso3166 and brief from parent layout if omitted (#266) 2022-01-24 11:16:08 +10:00
Peter Hutterer 9b05825e53 registry: skip over invalid ISO639 or ISO3166 entries
If the XML file is somehow off, don't load entries that are against the spec.
2022-01-24 10:44:31 +10:00
Peter Hutterer 34ef11d9c9 test: show the tool exit status on failure
We already do so for the non-successful cases, let's do this here too so we know
whether it was a signal or a normal exit.
2022-01-24 07:56:47 +10:00
Peter Hutterer 0e3f72af65 registry: don't call xmlCleanupParser()
From the documentation:
> It does not clean up parser state, it cleans up memory allocated by the library
> itself. It is a cleanup function for the XML library. It tries to reclaim all
> related global memory allocated for the library processing. [...]
> One should call xmlCleanupParser() only when the process has finished using the library.

http://xmlsoft.org/html/libxml-parser.html#xmlCleanupParser

Since we're a library ourselves we cannot know if something else in the same
proces uses the parser, so we must not call this.

Reported-by: M Hickford
2022-01-18 15:03:24 +10:00
Peter Hutterer be68829a6b CI: always run the linux workflow
This makes it easier for contributors to check if their code runs correctly
without having to file a PR.

The Mac and Windows workflows are a bit more involved, so let's keep those on
pull requests only.
2022-01-17 21:44:48 +10:00
Peter Hutterer 121cd37753 CI: split and rename the workflows to windows/macos/linux
"main" is a bit non-descriptive, let's name them after the platforms we run them
on. Splitting them up allows us to be less selective on how we run the various
workflows, e.g. always running the linux one.
2022-01-17 21:44:48 +10:00
M Hickford 9bbe629aad Update README.md
Co-authored-by: Ran Benita <ran@unusedvar.com>
2022-01-11 16:49:22 +02:00
matthickford 2e571b4392 Add instructions to run tests. Add build/ to .gitignore. 2022-01-11 16:49:22 +02:00
Alex Xu (Hello71) 8531ea723f build: add enable-tools option
this is mainly useful for multilib, but may be useful for other users as well

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
2021-12-05 12:55:51 +02:00
Peter Hutterer 50a24569b8 tools/list: print an empty string for null vendor strings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-11-11 08:26:36 +10:00
Peter Hutterer abb115c78f tools/list: enclose the the various field names in quotes
Because otherwise the 'no' layout is treated as disagreement with whatever is to
be disagreed with. Fixed in YAML 1.2 but that's not universally supported.

Fixes #268
2021-11-11 08:26:36 +10:00
Ran Benita e8cb431144 man: mention `xkbcli list` output is meant to be in YAML 1.2 format
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-11-01 23:56:22 +02:00
Ran Benita ae3b010e62 ci: possible fix for release workflow
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-09-17 00:00:11 +03:00
Ran Benita 88222c8d40 Bump version to 1.3.1
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-09-10 22:51:34 +03:00
Ran Benita 4a576ab184 x11: try to fix crash in xkb_x11_keymap_new_from_device error handling
In 1b3a1c277a we changed the error
handling in this code to not bail out immediately but only after
everything has been processed, to simplify the code. But I suspect the
code isn't prepared for this and that's what causing the crash reported
in the issue.

Bring back the short-circuit error handling which would hopefully fix
such crashes.

Fixes: https://github.com/xkbcommon/libxkbcommon/issues/252
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-09-09 16:52:47 +03:00
Ran Benita 4e361712d2 x11: stylistic fixes
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-08-31 22:03:03 +03:00
Ran Benita f8c430cf71 tools/how-to-type: add --keysym for how to type a keysym
Previously, could only check how to type a Unicode codepoint, but
searching for a keysym directly is also occasionally useful.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-07-31 22:03:33 +03:00
Simon Ser 5419e57736 tools/interactive-x11: use keysym to look for Esc
Don't assume that keycode 9 means Escape. Instead, use the keymap
to check for Esc.

Logic copied from the Wayland version.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-07-12 12:25:48 +03:00
Ran Benita eb59a1c55b bench/compose: fix compose file path
Forgotten in e2465c2.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-06-10 17:13:57 +03:00
Ran Benita 1318bedbb7 ci: some tweaks
- Reduce permissions
- Update some stuff

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:38:37 +03:00
Ran Benita c4fdcba305 ci: also link to tarball in github release
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:22:56 +03:00
Ran Benita 1f7ffde982 ci: automatically create github release when tag is pushed
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/233
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:20:12 +03:00
Ran Benita 8507af731a test/tool-option-parsing: don't depend on build prefix
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/244
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:11:10 +03:00
Ran Benita 98f07da895 test/compose: add tests for xkb_compose_table_new_from_locale lookup
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:07:06 +03:00
Ran Benita 5b1b2f7546 test/compose: clean up after a setenv
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 20:00:24 +03:00
Ran Benita e2465c2a69 tests/data: add files needed to fully test compose
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 19:58:40 +03:00
Ran Benita 09ac27f744 ignore: remove no longer relevant gitignore files
These were relevant for the autoconf build but now we're meson only.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 19:51:02 +03:00
Ran Benita 7062ab97b6 xkbcommon: deprecate XK_approxeq and XK_notapproxeq
Sync xorg-proto commit
25f3278b85

Fixes: #82
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-22 19:36:22 +03:00
Peter Hutterer 8e9f943d38 scripts/update-keysyms: fix path to the include files after de1b6943d
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-14 08:45:03 +10:00
Ran Benita b6aadd57d9 tools: add compose tool for Compose debugging
Not very useful so not exposed in xkbcli.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-08 21:37:28 +03:00
Ran Benita 1915632e06 compose: add mapped locale to Compose-file-not-found error log
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-08 21:08:37 +03:00
Ran Benita 13ba9135c0 Bump version to 1.3.0
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-05-01 23:51:23 +03:00
Ran Benita 16fe837d8d atom: rewrite as a hash table
While the previous 1987-style[0] scheme was fun (and I reasonably
optimized it for a fair comparison), this task is more suited to a hash
table. Even a simple implementation beats the old one.

[0] Seems to have first appeared in X11R1, released September 1987.
    See server/dix/atom.c here: https://www.x.org/releases/X11R1/X.V11R1.tar.gz

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 16:41:32 +03:00
Ran Benita baf5522649 bench: add atom benchmark
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 16:41:32 +03:00
Ran Benita 5f8c2fa41a bench/rulescomp: decrease benchmark iterations
No need for more, and easier to convert to milliseconds per iteration.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 12:32:21 +03:00
Ran Benita 9d87f84915 build: fix missing includes
Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:57:42 +03:00
Ran Benita de1b6943d2 Move include files to include/ subdirectory
This way we don't specify `include_directorories('.')` which brings in
more than needed.

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:10:26 +03:00
Ran Benita 8ff0232bda build: move the subproject variables to a common section at the end
As suggested in:
https://github.com/xkbcommon/libxkbcommon/pull/240#discussion_r620784021

Signed-off-by: Ran Benita <ran@unusedvar.com>
2021-04-27 10:02:54 +03:00
Adrian Perez de Castro 4238417ba0 Meson: Allow building as subproject
Specify where to find the headers for libxkbcommon_dep,
libxkbcommon_x11_dep, and libxkbregistry_dep,  which allows other
projects to correctly locate the headers when libxkbcommon is being
built as a Meson subproject.

The dep_libxkbregistry variable is renamed to libxkbregistry_dep,
to follow the usual convention for variables which hold declared
dependencies to be used from subproject builds.
2021-04-27 09:54:58 +03:00
Adrian Perez de Castro 5cd76a8d93 Windows: Pass list of symbols to export to MSVC
Arrange for passing .def files with the lists of symbols to export from
DLLs when building on Windows with MSVC. Without this no symbols were
being exported at all.

The .def files are generated from the .map files at build time using
scripts/map-to-def, which avoids needing to maintain two different sets
of files.
2021-04-27 09:54:00 +03:00
Peter Hutterer f434c690cc tools: change xkbcli list to output YAML
We have a lot of keyboard layouts and the current output format is virtually
useless at searching for a specific one to debug any issues with either the
layout list or the output from libxkbregistry.

Let's use YAML instead because that can easily be post-processed to extract the
specific layouts wanted, e.g. to get the list of all layouts:
  xkbcli-list | yq -r ".layouts[].layout"
to get the list of all variants of the "us" layout:
  xkbcli-list | yq -r '.layouts[] | select(.layout == "us") | .variant
and the number of option groups:
  xkbcli-list | yq -r '.option_groups[] | length'

Note that the top-level nodes have been de-capitalized, so where it was "Models"
before it is now "models" and the "Options" node is now "option_groups".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-27 09:53:32 +03:00
Peter Hutterer 693ffb073b tools: change the list separator handling
Slightly easier to read than the "bool first" approach.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-04-27 09:53:32 +03:00