Commit graph

491 commits

Author SHA1 Message Date
Marc Durdin
6a98a39b8a
Merge branch 'master' into chore/web-core-preflight 2026-05-27 22:37:12 +10:00
Keyman Server
94e1b26825
Merge branch 'epic/web-core' into auto/A19S26-merge-master-into-web-core 2026-04-13 15:47:18 +02:00
Eberhard Beilharz
8e9e957cc0
fix(linux): some refactorings and improvements 2026-04-09 20:37:21 +02:00
Eberhard Beilharz
fc6e2af9c6
Merge branch 'master' into fix/linux/context
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-04-08 18:30:45 +02:00
Eberhard Beilharz
ad9128eb1d
chore(linux): add comment on purpose of is_dirty flag
Addresses code review comment.
2026-04-08 18:16:08 +02:00
Eberhard Beilharz
b71f299d7e
Update linux/ibus-keyman/src/engine.c
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-04-08 18:08:34 +02:00
Eberhard Beilharz
b765b55660
fix(linux): fix memory problem
This fixes a problem identified by devin.ai: Because of the operator
precedence the previous code caused `memmove` to read
`sizeof(commit_queue_item) - 1` bytes past the end of `commit_queue`.
With this change `memmove` now reads the intended `MAX_QUEUE_SIZE - 1`
`commit_queue_items`.

Test-bot: skip
2026-04-07 15:14:37 +02:00
Eberhard Beilharz
40a0c929d9
fix(linux): fix context after typing Bksp with Wayland
This fixes a problem with the context after typing Backspace when
using Wayland. Wayland uses double-buffering for the text, so we always
have to commit after making changes.

Fixes: #15676
2026-04-07 14:45:22 +02:00
Eberhard Beilharz
6054975438
docs(linux): add clarifying comment about surrounding text 2026-04-01 19:36:09 +02:00
Marc Durdin
f6b8bfb463
Merge branch 'epic/web-core' into auto/A19S20-merge-master-into-web-core 2026-01-16 08:40:12 +01:00
Markus Greiner
bd492542cc fix(linux): issues when running ./build.sh test:linux, improving ibus-daemon stop after review
Test-bot: skip
2026-01-15 11:09:20 +01:00
Markus Greiner
8009bc7959
Update linux/ibus-keyman/tests/scripts/test-helper.inc.sh
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-01-15 10:20:49 +01:00
Markus Greiner
60db18681e fix(linux): issues when running ./build.sh test:linux 2026-01-14 22:35:00 +01:00
Eberhard Beilharz
69950055e2
fix(linux): fix persisting options
This change adds the verification of the options to the baseline tests
and fixes persisting the options. Previously we treated the UTF-16 key
and value as UTF-8 so that only the first character got persisted.

Test-bot: skip
2025-12-17 19:06:34 +01:00
Eberhard Beilharz
6de40e903b
test(common): better group baseline tests
This change groups similar tests together. Also update `build.sh` to
compile .js files.

Follow-up-of: #15341
Test-bot: skip
2025-12-15 18:12:01 +01:00
Eberhard Beilharz
65f2e354eb
maint(linux): suppress output of stopping processes after test run
This change suppresses the output of ending the processes started for
the test run. The output doesn't help much but clutters the overall
output and shows up as warnings on TC.
2025-10-06 16:13:44 +02:00
Eberhard Beilharz
6c2237d800
Merge pull request #14817 from keymanapp/maint/linux/13887_integrtests
maint(linux): fix integration tests in Docker

This PR allows the integration tests to work when running them in a Docker container. Also fixes things when running on TC's Ubuntu 24.04 Noble build agent, and improves the behavior when running directly on a developer's machine (previously typing stopped working after the tests...).

Also fixes building mcompile in a Docker container.

Fixes: #13887
2025-10-06 12:01:38 +02:00
Eberhard Beilharz
4f38d527b4
Apply suggestions from code review
Co-authored-by: Markus Greiner <90342882+Markus-SWAG@users.noreply.github.com>
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-09-30 11:01:31 +02:00
Eberhard Beilharz
167ec33d54
chore(linux): Merge remote-tracking branch 'origin/master' into maint/linux/remotedbgdocker 2025-09-30 08:29:02 +02:00
Eberhard Beilharz
4d477d4a64
docs(linux): update comment 2025-09-26 17:50:49 +02:00
Eberhard Beilharz
e0e4276fb3
maint(linux): improve running integration tests on developer's machine
This improves running the integration tests on a developer's machine.
While the tests did run fine it was no longer possible to type after
running the tests. The reason was that starting the `ibus-daemon` for
testing together with `mutter` replaced some processes that belonged to
the `ibus-daemon` of the session.

This change now checks if ibus is still functional after killing the
testing `ibus-daemon` (by checking the current engine with `ibus engine`).
Otherwise it kills the lonely remaining `ibus-daemon` and restarts `ibus`.

Test-bot: skip
2025-09-25 19:34:22 +02:00
Eberhard Beilharz
e0d0a4d4c1
maint(linux): fix running integration tests in Docker
Fixes: #13887
Test-bot: skip
2025-09-25 19:32:29 +02:00
Eberhard Beilharz
db3cd5092d
maint(linux): remove several shellcheck directives and warnings
This change improves our `.shellcheckrc` file so that several directives
are no longer needed and source files are still found. Also remove some
directives that are no longer necessary, either because the changes to
`.shellcheckrc` makes them obsolete, or because the lines changed so
that they no longer contain the problem.

Also remove some shellcheck warnings.

Build-bot: skip
Test-bot: skip
2025-09-23 18:30:16 +02:00
Eberhard Beilharz
23f8c59c07
maint(linux): allow to remote debug integration tests in Docker
This adds a `--remote-debug` option to `resources/docker-images/run.sh`.
If specified the container will expose `localhost:2345` for remote
debugging inside of the container.

This is useful for debugging integration tests in the container.

Build-bot: skip
Test-bot: skip
2025-09-23 18:20:32 +02:00
Eberhard Beilharz
643a7fb984
Merge pull request #14802 from keymanapp/refactor/linux/testscript 2025-09-22 12:02:53 +02:00
Eberhard Beilharz
b2046e065a
refactor(linux): remove shellcheck warnings
Build-bot: skip
Test-bot: skip
2025-09-19 18:41:26 +02:00
Eberhard Beilharz
37e0491b49
refactor(linux): remove a meson deprecation warning
`meson.build_root()` is deprecated in Meson 1.0+.

Test-bot: skip
2025-09-19 18:38:54 +02:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
808b6557d6 maint(common): use cpp_std=c++17 in meson project default_options
We attempted to set the C++ version in standard.meson.build, but this
does not work well as the option name varies by platform, and it also
triggers a warning in meson. This fix moves the setting into each
meson.build project() default_options. As there are only a handful
of these, the maintenance burden is not high.

Fixes: #14432
Relates-to: #14355
Build-bot: build
Test-bot: skip
2025-08-01 10:23:57 +10:00
Eberhard Beilharz
8e64a2ad75
Merge pull request #14403 from keymanapp/fix/linux/stoptestserver
maint(linux): fix stopping of test server
2025-07-29 11:34:21 +02:00
Eberhard Beilharz
ab060806ef
Merge pull request #14407 from keymanapp/refactor/linux/commoninclude 2025-07-28 09:26:27 +02:00
Eberhard Beilharz
08746e24a2
refactor(linux): remove shellcheck warnings
Test-bot: skip
2025-07-25 19:54:25 +02:00
Eberhard Beilharz
bfc3aa3456
refactor(linux): move dbus defines to common include
This got missed in #14372.

Fixes: #13281
Follow-up-of: #14372
Test-bot: skip
2025-07-25 19:39:50 +02:00
Eberhard Beilharz
183a8455b0
maint(linux): fix stopping of test server 2025-07-25 15:53:15 +02:00
Eberhard Beilharz
d0d774f72c
refactor(linux): move defines to common header files
Fixes: #13281
Test-bot: skip
2025-07-17 19:41:26 +02:00
Eberhard Beilharz
ee93d0d27a
maint(linux): add --no-werror option to not report warnings as errors
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.

Fixes: #13970
Test-bot: skip
2025-05-20 09:01:22 +02:00
Eberhard Beilharz
1f8b352529
Merge pull request #13904 from keymanapp/maint/linux/debpkg
This fixes Lintian warnings and other comments from the Debian review of the package. It also removes unnecessary files from the source package.

Note: this PR uses `Expat` instead of `MIT` in the `debian/license` file since that is the term that Debian uses and that the Debian tools output. It doesn't really matter since the term serves only as a key in the `license` file that links the files to the full text of the license further down in the `license` file.

Fixes: #13905
2025-05-15 16:25:38 +02:00
Eberhard Beilharz
d75372f3c3
maint(linux): remove check for patched ibus from meson.build
Since Keyman 18 we no longer require a patched ibus, so we can remove
the check from the meson build file.
2025-05-14 08:46:58 +02:00
Eberhard Beilharz
fc79e38cc4
maint(linux): fix lintian warnings
This addresses comments from Debian review of the package.
2025-05-13 20:07:32 +02:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Eberhard Beilharz
5bc7c22f80
change(linux): add ICU dependency needed to build on Arch Linux
Co-authored-by: Nikita Moor <nikita@lreis.ac.cn>
Fixes: #13814
2025-05-06 12:11:10 +02:00
Marc Durdin
9d2db4faf3 maint(common): consolidate standard.meson.build configuration
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
2025-04-30 09:16:43 +07:00
Marc Durdin
f8917d2454 maint(common): cleanup meson versioning
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number

Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
2025-04-30 08:23:05 +07:00
Marc Durdin
4f829f5c8f chore: Merge remote-tracking branch 'origin/master' into chore/merge-beta-to-master-b18s5 2025-04-21 07:13:35 +07:00
Eberhard Beilharz
6d39ab0b06
Merge pull request #13625 from keymanapp/fix/linux/13590_arrow-keys
fix(linux): allow unhandled keys to pass through to compliant apps

This change fixes a bug introduced in #13372. Before that engine.c determined if keys are handled or not. For keys that we didn't handle we returned FALSE. However, that didn't allow the Core to adjust the context where necessary, so #13372 moved that to Core. However, this caused ibus_keyman_engine_process_key_event to return TRUE even if we didn't handle the key. Instead we called ibus_engine_forward_key_event with the non-handled key. This worked in most applications, but not in the Text Editor.

This change now does no longer call ibus_engine_forward_key_event for compliant apps but instead returns FALSE from ibus_keyman_engine_process_key_event for unhandled keys, allowing the app to see and act on the key event.

An 'unhandled' key here is a key that doesn't match a rule in the keyboard and isn't a character key. Core returns a QIT_EMIT_KEYSTROKE action for that key.

Fixes: #13590
2025-04-03 10:26:27 +02:00
Eberhard Beilharz
659e844f83
docs(linux): add function headers for some of the engine methods 2025-04-01 16:46:18 +02:00
Eberhard Beilharz
ac6b521583
docs(linux): clarify the newly added return values
Addresses code review comments.
2025-04-01 16:44:29 +02:00
Eberhard Beilharz
915d30cd95
fix(linux): fix cursor movement
This change fixes a bug introduced in #13372. Before that `engine.c`
determined if keys are handled or not. For keys that we didn't handle
we returned `FALSE`. However, that didn't allow the Core to adjust the
context where necessary, so #13372 moved that to Core. However, this
caused `ibus_keyman_engine_process_key_event` to return `TRUE` even if
we didn't handle the key. Instead we called `ibus_engine_forward_key_event`
with the non-handled key. This worked in most applications, but not
in the Text Editor.

This change now does no longer call `ibus_engine_forward_key_event` for
compliant apps but instead returns `FALSE` from
`ibus_keyman_engine_process_key_event` for unhandled keys, allowing the
app to see and act on the key event.

Fixes: #13590
2025-03-31 17:58:08 +02:00
Eberhard Beilharz
4a9a3dc55f
refactor(linux): remove a warning
The previous code resulted in warnings showing up:
`(ibus-engine-keyman:4276): GLib-CRITICAL **: 14:31:16.030: g_hash_table_lookup: assertion 'hash_table != NULL' failed`.
This should work around the warning.
2025-03-31 16:33:31 +02:00
Marc Durdin
a52437c407 chore: Merge branch 'master' into chore/b18s4-merge-beta-to-master 2025-03-29 05:38:08 +07:00