Public bug reported:
[Impact]
On Ubuntu 26.04 (mutter 50.1-0ubuntu2.4), every key an input method forwards
through GNOME Shell is
dropped before it reaches the focused Wayland client. Vietnamese input methods
(and any other IBus engine
that replaces already-committed text) forward BackSpace and then commit the
corrected text, so the
deletion never happens and the text is corrupted: typing the Telex sequence
`tieengs` produces
`tieêngếng` instead of `tiếng`.
Each dropped key logs:
gnome-shell[...]: clutter_event_key_new: assertion
'CLUTTER_IS_INPUT_DEVICE (source_device)' failed
Since mutter 50.0, `clutter_input_method_forward_key()` creates the key event
with a NULL source device,
which `clutter_event_key_new()` rejects. Upstream fixed this in 50.4 by letting
input-method events go
through without a device:
- Issue: https://gitlab.gnome.org/GNOME/mutter/-/work_items/4853
- MR: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5121
- Commit: 2710ddc8a2515a0a77afde4cb9a70a4b14c72f14 (main), cherry-picked as
570de65dd05e1b362fdef90dcb811c22acd8a8e2 (gnome-50, in 50.4)
The fix is a one-line change in clutter/clutter/clutter-event.c. 24.04 (mutter
46) is not affected: it
passes the seat keyboard as the source device.
[Test Plan]
1. Ubuntu 26.04 GNOME Wayland session, fcitx5 acting as the IBus daemon (or any
IBus engine that emits
ForwardKeyEvent for BackSpace), with an input method that replaces text this
way.
2. Focus a native Wayland text field that goes through GNOME Shell's input
method, e.g.
gnome-text-editor without GTK_IM_MODULE set, or Chromium.
3. Type `tieengs`.
- Without the fix: `tieêngếng`, and the assertion above is logged once per
forwarded press/release
(24 lines for 3 attempts × 4 BackSpaces × press+release in our run).
- With the fix: `tiếng`, no assertion.
Measured on mutter 50.1-0ubuntu2.4 (affected) and upstream mutter 50.5
(works).
[Where problems could occur]
The change only relaxes a precondition for events flagged
CLUTTER_EVENT_FLAG_INPUT_METHOD; other key
events still require a source device. Code that assumes every key event has a
source device could see
a NULL device for input-method events; upstream relies on
clutter_event_get_source_device() being
nullable and has shipped this in 50.4, 50.5 and 51.
** Affects: mutter (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to mutter in Ubuntu.
https://bugs.launchpad.net/bugs/2169784
Title:
IBus ForwardKeyEvent is dropped for Wayland clients:
clutter_event_key_new assertion 'CLUTTER_IS_INPUT_DEVICE
(source_device)' failed (fixed upstream in 50.4)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2169784/+subscriptions
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs