Commit graph

216 commits

Author SHA1 Message Date
Marc Durdin
c37a15b317 chore(core): update linux test makefile refs to debuglog 2022-10-25 06:33:44 +11:00
Marc Durdin
0945b92732 chore: Merge branch 'master' into chore/merge-master-into-feature-ldml 2022-10-13 13:38:31 +11:00
Eberhard Beilharz
bcd29634bf
feat(linux): Address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-10-11 18:44:30 +02:00
Eberhard Beilharz
908dfbeefb
feat(linux): Optimize if surrounding text is supported
Only send fake event if client does not support surrounding text.
2022-10-11 18:44:30 +02:00
Eberhard Beilharz
e6601f205c
feat(linux): match state of original event when creating fake event
We forward a fake event for both keydown and keyup. This change
will set the flag on the fake event so that we get keydown and keyup.
This is probably not technically necessary, but it helps in
debugging because you can then see that both fake events still
belong to the same keypress.
2022-10-11 18:44:30 +02:00
Eberhard Beilharz
dba2002287
feat(linux): Still support older ibus versions
If we're dealing with an older ibus version that doesn't have the
necessary patches we fall back to the old behaviour. Otherwise
we use the new output reordering.
2022-10-11 18:44:29 +02:00
Eberhard Beilharz
e1d4169eeb
feat(linux): Optimizations 2022-10-11 18:44:29 +02:00
Eberhard Beilharz
18d0711ff3
fix(linux): Fix reordering of output
This change implements a commit queue which allows to control the
order of the output. This ensures that any backspace we generate
will be processed before the character we're adding.

Requires changes in ibus (surrounding text fix (see #7072) and
prefilter change)

Fixes #1489, #4028, #4029, #4030, #4505, #5510, #6639
2022-10-11 18:44:28 +02:00
Eberhard Beilharz
efbfaa1be4
chore(linux): Cleanup unnecessary surrogate check
Previously `process_unicode_char_action` checked for
`action_item->character` being a surrogate. This should never happen
because `action_item->character` is a 32-bit character. This change
removes the unnecessary check and the `keyman->firstsurrogate` field.

Fixes #6385.
2022-10-04 19:24:58 +02:00
Marc Durdin
55f302d929
Merge pull request #7322 from keymanapp/chore/merge-master-to-feature-ldml
chore: merge master into feature-ldml 🙀
2022-09-20 13:42:40 +10:00
Eberhard Beilharz
af6c6db49a
chore(linux): Remove unused IBusLookupTable 2022-09-15 18:53:44 +02:00
Marc Durdin
655c872dc8 chore: Merge branch 'master' into chore/merge-master-feature-ldml 2022-08-30 06:31:04 +10:00
Marc Durdin
895ce930a0
Merge pull request #6993 from keymanapp/chore/core/rename-json-source
chore(core): rename json.hpp to jsonpp.hpp 🛩
2022-08-29 14:48:32 -05:00
Eberhard Beilharz
7169723d54
fix(linux): Remove wrong ok_for_single_backspace method
The implementation of `ok_for_single_backspace` checked the current
action_item multiple times. However, we already know that that
item is `KM_KBP_IT_BACK` because the only place this method gets
called is from the `process_backspace_action` method. So basically
this method always returns `FALSE`. "Fixing" this method to check
the next action_items makes things fail.

Removing this method since it doesn't do anything except burn
processing cycles...

Fixes #5614.
2022-08-25 18:38:06 +02:00
Marc Durdin
e6ff47f2b3 chore: Merge branch 'master' into feature-ldml 2022-08-24 04:21:21 +10:00
Steven R. Loomis
e8dff5cf4e feat(core): add event_flags to process_event #7046
- use a constant, KM_KBP_EVENT_FLAG_DEFAULT for 0
- update pascal and python
- update linux and windows
2022-08-12 09:58:58 -05:00
Marc Durdin
e30871f01e chore(linux): add common/include to further paths 2022-08-11 14:56:46 +02:00
Marc Durdin
600f6bfec4 chore(linux): update include paths 2022-08-11 13:18:28 +02:00
Marc Durdin
b5bddc025f chore(core): rename json.hpp to jsonpp.hpp
The name json.hpp conflicts with the JSON for Modern C++ library that
is also used by Developer. Renames json.hpp and json.cpp to jsonpp.hpp
and jsonpp.cpp aka "JSON Pretty Printer".
2022-07-26 13:06:16 +10:00
Marc Durdin
d5aa61fdc0 chore(common): Merge branch 'chore/web/keyman-version-for-developer' into chore/common/move-common-core-desktop-to-core 2022-05-30 09:38:27 +10:00
Marc Durdin
4ab3c53810 chore(common): adjust scripts for core relocation 2022-05-18 07:22:11 +10:00
Eberhard Beilharz
acd0a252b0
chore(linux): Fix failure in Debian reproducibility testing
Debian reproducibility testing runs a slightly different package
build that seemingly doesn't set the `DEB_BUILD_MULTIARCH` variable.
This change introduces our own environment variable to detect
package builds so that we can skip the ibus-keyman integration
tests that require running an X server.
2022-04-20 16:50:38 +02:00
Eberhard Beilharz
aa7537730a
feat(linux): Allow to run ibus tests on Wayland
This change modifies the `run-tests.sh` script so that tests
run on both Wayland (if supported) and X11 unless
`--no-wayland` or `--no-x11` is specified.

This change also adds the new argument `--wayland` to the
`ibus-keyman-tests` executable which runs the tests under
Wayland.

Note that running Wayland tests is only possible in Ubuntu 21.10+
because it requires a version of `mutter` that supports the
headless option which got added in mutter 40.
2022-03-31 17:52:50 +02:00
Eberhard Beilharz
cab9ced56d
chore(linux): Update copyright 2022-03-14 12:08:09 +01:00
Eberhard Beilharz
4cad24cac3
chore(linux): Fix lintian warnings 2022-03-10 20:30:44 +01:00
Eberhard Beilharz
d9e4ad7899
feat(linux): add support for Wayland
This allows to use Keyman with the Wayland display server.
One thing that doesn't yet work completely with this change is
caps-lock.

Partially implements #4273.
2022-01-20 19:21:57 +01:00
Eberhard Beilharz
ae9cb97ce6 fix(linux): Improve ibus-keyman tests
This change will hopefully help some tests that occasionally fail
on TC. After setting the options during the test setup we sync the
settings before running the test scenario.
2021-12-14 14:10:58 +01:00
Eberhard Beilharz
855cb9d916
refactor(linux): Refactor two core tests
This change refactors two tests to no longer rely on obscure internal
knowledge. This allows the tests to also run in ibus-keyman.
2021-12-03 17:23:36 +01:00
Eberhard Beilharz
e31cf4a1d8
chore(linux): add non-surrounding-text feature to tests
This also fixes a failing test (`048 - modifier keys keep context`)
if surrounding text is not supported. If the user presses the
capslock key we shouldn't reset the context if no rules match.

Fixes #5613.
2021-12-03 17:23:35 +01:00
Eberhard Beilharz
30897811c0
Merge pull request #5966 from keymanapp/fix/linux/tests
fix(linux): Fix ibus-keyman integration tests 🎫
2021-11-29 09:55:30 +01:00
Ross
b54be8aa9b feat(windows): add kmx_conversion.cpp to test Makefile.am 2021-11-29 10:56:53 +10:00
Eberhard Beilharz
37e20c5cbb
fix(linux): Fix ibus-keyman integration tests
Previously we overwrote our test data, so we basically ran the same
test repeatedly under different names.

Properly running them showed some failures which this change also
fixes or skips.
2021-11-24 15:59:44 +01:00
Eberhard Beilharz
f1dcb71127
chore(linux): Run ibus-keyman tests as part of build
Part of #5613.
2021-11-22 15:40:37 +01:00
Eberhard Beilharz
07fb8084ee
chore(linux): Fix unit tests
Array has to be NULL terminated.
2021-11-22 15:40:17 +01:00
Eberhard Beilharz
65d1a3f9a0
chore(linux): Improve run-tests.sh script
Part of #5613.
2021-11-22 15:40:17 +01:00
Eberhard Beilharz
b9428c9ae8
chore(linux): Remove unused test methods
This change removes the pre-edit related test methods since we
don't use the pre-edit option.
2021-11-19 15:10:56 +01:00
Eberhard Beilharz
8f708a55e2
Merge pull request #5883 from keymanapp/chore/linux/comments
chore(linux): Update method comments
2021-11-16 07:55:54 +01:00
Eberhard Beilharz
d8ee425eb2
chore(linux): fix memory allocation in keymanutil.c
Also add unit tests for keyman_put_options_todconf.
2021-11-15 19:22:04 +01:00
Eberhard Beilharz
642bad8d7d
fix(linux): fix freeing of options 2021-11-08 12:38:00 +01:00
Eberhard Beilharz
be7dd09cb0
chore(linux): Address code review comments 2021-11-08 12:02:30 +01:00
Eberhard Beilharz
16ebd7e653
Merge pull request #5884 from keymanapp/chore/linux/5613-unittests
chore(linux): fix failing ibus-keyman tests 🎫
2021-11-08 10:16:32 +01:00
Eberhard Beilharz
65fc5efce5
Merge pull request #5885 from keymanapp/chore/linux/removetests
chore(linux): cleanup defunct tests 🎫
2021-11-08 10:15:35 +01:00
Eberhard Beilharz
5e6585717d chore(linux): fix run-tests.sh script
Part of #5613.
2021-11-05 22:35:09 +01:00
Eberhard Beilharz
2974ac03d7
chore(linux): Cleanup
Remove unnecessary functionality from test client. Part of #5613.
2021-11-05 18:48:34 +01:00
Eberhard Beilharz
2095d98c14
chore(linux): Update method comments 2021-11-05 16:27:22 +01:00
Eberhard Beilharz
78da8aa33a
chore(linux): fix _delete_surrounding in ibus-keyman test client
Part of #5613.
2021-11-05 16:26:15 +01:00
Eberhard Beilharz
2ab39581eb
chore(linux): set options before running test
Part of #5613.
2021-11-05 16:26:04 +01:00
Eberhard Beilharz
ce4ced05a6
chore(linux): cleanup defunct tests
The previously existing ibus-keyman tests didn't work reliably and
were never executed automatically. This change removes them.
2021-11-05 15:56:37 +01:00
Eberhard Beilharz
2caaffd4e5
chore(linux): Fix build
# Keyman Conventional Commit suggestions:
# - Consider appending the text ". Fixes #5613" to your commit message.
2021-11-05 12:00:37 +01:00
Eberhard Beilharz
cdee19e953
chore(linux): Add integration tests for ibus-keyman
This change adds integration/regression tests for ibus-keyman. It
re-uses the unit tests that we have for core.

Also modifies one test so that the context doesn't use characters
used in the keyboard. This makes it easier to setup in ibus-keyman
tests.
2021-11-04 09:22:28 +01:00