When using a different DBus implementation `dbus-launch` might not exist,
but instantiating a `SessionBus` object might start a session dbus if
it's not already running. This change also replaces the `dbus-x11`
dependency with `default-dbus-session-bus | dbus-session-bus` and changes
the way we detect if dbus is already running.
Also remove `DBUS_SESSION_BUS_ADDRESS` from `sudo gsettings` call. It
turns out we don't need this since we execute the `gsettings` command
in the context of the user anyway which connects to the user's session
dbus.
Cherry-pick-of: #14895Fixes: #14888
Test-bot: skip
It looks like we no longer need these lintian overrides:
- `package-contains-documentation-outside-usr-share-doc` got resolved
by excluding these directories from our source package
- the other one was a false positive that looks like it got fixed in
Debian
Cherry-pick-of: #14810
Test-bot: skip
With this change we wait two seconds after creating the PR before trying
to get the number of the PR so that GitHub can catch up. Previously
recently it wasn't able to get the PR#.
Also adjust the commit message and use the new header for skipping tests.
Cherry-pick-of: #13890
Build-bot: skip
Test-bot: skip
`onboard-keyman` isn't available on Debian/Ubuntu and doesn't work
properly with Wayland. This change removes the `onboard-keyman`
recommends which used to cause `onboard-keyman` to be installed
automatically together with `keyman`. The user can still manually install
`onboard-keyman`.
Fixes: #14769Fixes: #5214
Cherry-pick-of: #14772
Build-bot: skip
Test-bot: skip
Fixes: #14748
Fixes: KEYMAN-LINUX-8Q
Cherry-pick-of: #14760
# User Testing
**TEST_INSTALL**: open `km-config` and install a keyboard. Verify that
the keyboard gets added to the list of installed keyboards in `km-config`
as well as to the languages dropdown in the taskbar.
Some keyboards seem to be missing the `keyboards` section in the
`kmp.json` file. This change prevents a crash and instead returns `None`
and thus we don't create a .ldml file and so onboard will show the
default keyboard instead. The alternative would be to create an empty
.ldml file, but that causes onboard to show a keyboard with all key caps
being empty.
Cherry-pick-of: #14708Fixes: #14707
Fixes: KEYMAN-LINUX-8P
Test-bot: skip
During a package build a patch directory (`.pc`) might get created.
That can't and shouldn't be part of the source package. This change
excludes any `.pc` directories.
Cherry-pick-of: #14600
Build-bot: skip
Test-bot: skip
This change creates a temporary worktree for creating Debian packages.
This will allow us to work from a clean state of the source repo. Also
exclude any generated patch directories (`.pc`).
Cherry-pick-of: #14598
Build-bot: skip
Test-bot: skip
This fixes a typo when we try to remove the temporary files created
during dependency installation. This caused build failures because
the wrong spelling was not in the list of allowed commands, so sudo
kept asking for a password.
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
Cherry-pick-of: #13988
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
Cherry-pick-of: #13988
Test-bot: skip
Previously keyman-system-service didn't have any unit tests. With the
gcov/lcov versions available for Ubuntu 24.04 Noble this suddenly caused
a failure when trying to generate the test coverage report, although it
worked fine with older versions.
This change adds a do-nothing unit test stub for keyman-system-service.
This allows to generate the coverage reporting with Ubuntu 24.04 Noble.
Cherry-pick-of: #13740
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.
Several keys that are defined in `winuser.h` were added after Keyman
defined its vkeys and so are not documented in the Keyman docs. This
change adds underscores before and after to mark them as being internal.
It's still useful to have them in the source code because it makes the
mapping between Linux keys and Keyman vkeys easier.
Addresses code review comment.
This change tries to map all keys to corresponding Core VKeys so that
Core sees them and can reset the context if necessary. Previously we
had 0 for most of the keys, which meant that we didn't send them to
Core but instead returned right away. While this doesn't directly fix
the failing user tests described in #12968, it fixes the original tests
in #11172.
Closes: #12968
For some reason when using a LDML keyboard we ended up emitting a
keystroke even though Core returned `FALSE for `emitting_keystroke`.
I wasn't able to track down where this happened, but this change seems
like an easy way to fix it.
This showed up when debugging why the changes in #13372 didn't work for
non-compliant apps.
The new name `initialize_queue_items` makes it clearer that we initialize
some items in the queue and not the entire queue (which might still
contain items that we do want to keep).