Commit graph

393 commits

Author SHA1 Message Date
Eberhard Beilharz
a08fbd1346
fix(linux): Ignore keys with IBUS_MOD4_MASK set
If we process keys that have the (Super/Meta/Windows) IBUS_MOD4_MASK
modifier set we ignore the key. Core doesn't handle the Meta modifier
state and so would treat it as regular key. This fixes switching keyboards
in Ubuntu 23.10/24.04 on Wayland.

Fixes #10476.
2024-02-07 18:14:05 +01:00
Marc Durdin
70ba1d1c1e
Merge branch 'chore/core/10520-hide-old-action-apis' into fix/core/10582-km_core_state_get_actions-idempotency 2024-02-05 13:44:47 +11:00
Marc Durdin
8156a8b19d
Merge pull request #10576 from keymanapp/fix/linux/9593_version-comparison
fix(linux): Fix version comparison
2024-02-02 09:47:37 +11:00
Eberhard Beilharz
13eb1002ae
refactor(linux): Deal with invalid version numbers 2024-02-01 17:26:38 +01:00
Eberhard Beilharz
df24cfda0a
chore(linux): Use correct format specifier for g_utf8_strlen
The package build on armhf failed because of the wrong format specifier
which expects a `size_t` instead of `glong` that `g_utf8_strlen` returns.
2024-02-01 16:51:10 +01:00
Eberhard Beilharz
f3efb244dc chore(linux): Adjust test expectations for ICU >= 73
ICU 73 comes with CLDR 43 which contains various corrections. This means
that we get different results when we minimize `bmf-Latn`. This change
sets the test expectations based on the ICU version and so allows tests
to pass on Ubuntu 24.04 which comes with ICU 74.
2024-02-01 14:55:36 +07:00
Marc Durdin
1b88ab99be fix(core): make km_core_state_get_actions() idempotent
Fixes #10582.

Returned struct from the `km_core_state_get_actions()` API is now owned
by the state object. This is a change in API contract. The corresponding
`km_core_actions_dispose()` API has been made private, because there is
never any need for API consumers to call it. As this change is happening
in alpha, we won't bump the ABI version.

`state->app_context` is now guaranteed to be in sync with
`state->context` after `km_core_process_event()`, with the actions
struct populated at that point.

The next and final step in this refactor is to remove the actions queue
altogether from the Core and make that a kmn-only concept, but that will
wait until 18.0. The only consumers of the actions queue are the
kmn-specific interactive debugger in Keyman Developer, and kmn-specific
Input Method eXtensions in Keyman Engine for Windows.
2024-02-01 11:28:08 +07:00
Eberhard Beilharz
02008dc585
fix(linux): Fix version comparison
Implement proper comparison of versions so that 1.10 is newer than 1.9.

Fixes #9593.
2024-01-31 14:47:35 +01:00
Eberhard Beilharz
6d5accdaa4
chore(linux): Adjust test expectations for ICU >= 73
ICU 73 comes with CLDR 43 which contains various corrections. This means
that we get different results when we minimize `bmf-Latn`. This change
sets the test expectations based on the ICU version and so allows tests
to pass on Ubuntu 24.04 which comes with ICU 74.
2024-01-31 12:05:14 +01:00
Marc Durdin
f546c44048
Merge pull request #10390 from keymanapp/epic/core/9999-normalization
epic: Keyman Core normalization 🌱
2024-01-31 10:45:51 +11:00
Eberhard Beilharz
60746e02d0
chore(core): Fix compilation error 2024-01-29 18:00:14 +01:00
Eberhard Beilharz
6b5b44eddd
fix(linux): Fix packaging on Ubuntu and Debian servers
When building packages warnings are treated as errors. When building on
Ubuntu and Debian servers we don't have a patched ibus version but still
want to build the packages. So this change outputs a message instead of
a warning when building packages.
2024-01-29 17:50:04 +01:00
Eberhard Beilharz
a79e64b02d
chore(linux): Add more debug output 2024-01-25 20:02:22 +01:00
Eberhard Beilharz
c713cd02cc
refactor(linux): address code review comments 2024-01-24 14:27:43 +01:00
Eberhard Beilharz
372af218ca
refactor(linux): Use km_core_state_action_items struct instead of queue
Implements #10353.
2024-01-23 17:05:49 +01:00
Marc Durdin
307f7da846 refactor(linux): use km_core_state_context_debug
Relates to #10365.
Fixes #10378.
2024-01-15 08:27:01 +07:00
Marc Durdin
9830f9ea24 refactor(core): use km_core_state_context_clear where possible
Relates to #10365.

Use `km_core_state_context_clear()` instead of `km_core_context_clear()`
as part of eliminating use of `km_core_state_context()`.
2024-01-12 12:05:00 +07:00
Eberhard Beilharz
9b768c57d7
refactor(linux): Use km_core_state_context_set_if_needed
Also update comment on `km_core_state_context_set_if_needed` to make it
clearer that it's expecting a UTF-16 string.

Closes #10212.
2024-01-10 18:57:41 +01:00
rc-swag
aef718c56b fix(core): update linux test load_source call 2023-12-15 14:05:37 +10:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
Eberhard Beilharz
52bb859817
chore(linux): Rename (lib)kmnkbp to (lib)keymancore 2023-10-19 10:35:09 +02:00
Eberhard Beilharz
7b06beb7b9
Merge pull request #9781 from keymanapp/chore/linux/fixbuild
chore(linux): Fix build scripts
2023-10-18 11:38:46 +02:00
Eberhard Beilharz
337018a24b
chore(linux): Add missing tests
This adds (and fixes) two tests that were previously left out by
accident.
2023-10-17 20:29:28 +02:00
Eberhard Beilharz
08a259c6e2
chore(linux): Fix build scripts
Creating the coverage option to ninja previously didn't work reliably.
This change re-orders the parameters passed to `meson setup` and seems
to work better. Additionally this change refactors the scripts and makes
use of `builder_run_action`.
2023-10-17 20:01:05 +02:00
Eberhard Beilharz
0eb5065bf4
chore(linux): Unnecessary to check for NULL before calling g_free
`g_free` will return if the parameter is NULL, so we don't have to
check for that.

See glib [documentation](https://docs.gtk.org/glib/func.free.html).
2023-10-16 18:24:56 +02:00
Eberhard Beilharz
b0dd74ca59
feat(linux): Ignore invalid values in custom keyboards list 🏘️ 2023-10-12 18:31:42 +02:00
Eberhard Beilharz
8e1ee9ea7b
feat(linux): Allow loading of keyboards with arbitrary language 🏘️
Part of #8598.
2023-10-12 18:31:42 +02:00
Eberhard Beilharz
2a7d1758ae
feat(linux): Store user-added keyboards in GSettings 🏘️ 2023-10-12 18:31:41 +02:00
Eberhard Beilharz
7bab603b5b
refactor(linux): Simplify adding keyboard
Before we add a keyboard we check if we already added this keyboard
(in a different area). If we did (with the same or newer version) we
skip this keyboard. This change now immediately returns whereas previously
we set a flag and then didn't execute the rest of the method.
2023-10-10 18:00:05 +02:00
Eberhard Beilharz
7340c6be1f
chore(linux): Improve process check 2023-10-10 15:52:52 +02:00
Eberhard Beilharz
2356a39efa
chore(linux): Add testname to log file 2023-10-10 15:52:52 +02:00
Eberhard Beilharz
22126a0eef
refactor(linux): Use auto cleanup 2023-10-10 15:52:51 +02:00
Marc Durdin
db76e2541d chore: rename KM_KBP_ to KM_CORE_ 2023-10-09 14:53:22 +07:00
Marc Durdin
ba5f18defd chore: rename km_kbp_ to km_core_ 2023-10-09 14:53:13 +07:00
Marc Durdin
906a0a2ed7 chore: fix typo 2023-10-09 14:41:01 +07:00
Marc Durdin
4ef18f5e29 chore(core): rename keyboardprocessor.h to keyman_core_api.h
Fixes #9721.

Also tweaks some documentation references to keyboardprocessor, but does
not touch those relating to debian/control.
2023-10-09 14:21:01 +07:00
Eberhard Beilharz
4ab6031d0b
chore(linux): Address code review comments 2023-09-29 10:07:11 +02:00
Eberhard Beilharz
3812a1da3b
refactor(linux): Add more tests for keymanutil.c 🏘️ 2023-09-28 17:25:11 +02:00
Eberhard Beilharz
08f0b4dfed
chore(linux): Extract free_info method in kmpdetails.c 🏘️
Also add guard to kmpdetails.h.
2023-09-28 13:18:59 +02:00
Eberhard Beilharz
43ae210494
chore(linux): Fix run-tests.sh script
This passes the new parameter to the `setup` call which got introduced in
a previous PR.
2023-09-27 12:58:00 +02:00
Eberhard Beilharz
650c04d21c
chore(linux): Dynamically choose display number
This improves reliability if some processes are still running from a
previous run, which previously caused the tests to fail.

Also in the case of failed processes, list which ones are missing.
2023-09-26 18:09:13 +02:00
Eberhard Beilharz
4ecaad6ef1
chore(linux): Address code review comments 2023-09-26 13:04:33 +02:00
Eberhard Beilharz
1b5a86607d
chore(linux): Check that background processes are still running
Before we run a test we now check that ibus and the other processes
we need are still running. If not we run test setup again.

Maybe fix #9570.
2023-09-25 18:55:54 +02:00
Eberhard Beilharz
90627428c4
chore(linux): Debug test failures
This no longer suppresses the output of cleanup.
2023-09-21 18:55:28 +02:00
Eberhard Beilharz
4e4a1215ce
chore(linux): Fix bug in ibus-keyman run-tests.sh script 2023-09-21 18:55:27 +02:00
Eberhard Beilharz
3d8cf1830b
chore(linux): Add dependency to build.sh
For integration tests ibus-keyman requires keyman-system-service to
be built, so we add this as a dependency.
2023-09-21 16:11:43 +02:00
Eberhard Beilharz
447bc842ae
docs(linux): Update readme for ibus-keyman tests 2023-09-21 10:25:48 +02:00
Eberhard Beilharz
c16b602865
chore(linux): Check existence of services directory
When running the integration tests, we provide a test service that
replaces `keyman-system-service`. DBus needs the updated `.service`
files in the `services` directory so that it will use the test
service. This change outputs an error and returns an non-zero
exit code if it can't find the `services` directory, which usually
means that `keyman-system-service` didn't get build.
2023-09-21 10:25:48 +02:00
Eberhard Beilharz
89eab5e0ee
chore(linux): Don't crash if error is not set 2023-09-21 10:25:48 +02:00
Eberhard Beilharz
4e8e09186c
Merge pull request #9583 from keymanapp/chore/linux/coverage
chore(linux): Add coverage action to `ibus-keyman/build.sh`
2023-09-20 08:52:48 +02:00