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
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
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
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.
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
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
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
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
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
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
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
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
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
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.
* 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.
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
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
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.