Bug 2237486 - No preedit styling at all in Plasma Wayland, not even underline
Summary: No preedit styling at all in Plasma Wayland, not even underline
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: fujiwara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-05 17:19 UTC by Mike FABIAN
Modified: 2023-09-18 00:15 UTC (History)
4 users (show)

Fixed In Version: ibus-1.5.29~rc1-3.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-18 00:15:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Video showing the problem (1.58 MB, video/mp4)
2023-09-05 17:26 UTC, Mike FABIAN
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-963 0 None None None 2023-09-07 07:01:47 UTC

Description Mike FABIAN 2023-09-05 17:19:36 UTC
[mfabian@fedora ~]$ cat /etc/fedora-release 
Fedora release 39 (Thirty Nine)
[mfabian@fedora ~]$ rpm -q plasma-workspace-common
plasma-workspace-common-5.27.7-1.fc39.x86_64
[mfabian@fedora ~]$ 

Reproducible: Always

Steps to Reproduce:
Installed Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso in  qemu-kvm:

nice -n 19 ionice -c 3 qemu-kvm -machine pc-q35-6.2 -cpu host -enable-kvm -m 4G -smp 2 -drive file=./Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso.qcow2,index=0,media=disk,cache=unsafe -rtc base=localtime -serial file:/tmp/qemu-Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso.qcow2-output.log -name Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso.qcow2 -cdrom ./Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso -boot c -nic user,model=e1000,ipv4=on,ipv6=off,dnssearch=redhat.com,dns=10.38.5.26,hostname=Fedora-Everything-netinst-x86_64-39-20230903.n.0.iso.qcow2,hostfwd=tcp::5558-:22 -spice port=6002,disable-ticketing=on,streaming-video=off -vga virtio -display vnc=:6 -monitor stdio -usb -device usb-mouse -device adlib -device sb16 -device ES1370 -device gus -device intel-hda -device hda-duplex -device cs4231a -device AC97

- Installation in Japanese
- later added KDE (sudo dnf groupinstall -v kde-desktop-environmemt)
- Switched language to English.
- Tested ibus according to the “How To Test” in: https://fedoraproject.org/wiki/Changes/IBus_1.5.29

Ibus works, but none of the input methods show any styling of the preedit. In Gnome Wayland, at least the preedit always has a single underline, even though no other preedit styling like different underline styles or foreground and background colours work in Gnome Wayland. At least the single underline under the whole preedit works in Gnome Waylane (The single underline in Gnome Wayland unfortunately cannot switched off for parts of the preedit, but better that underline than nothing at all)

Here in Plasma Wayland the preedit has no styling whatsoever. Not even an underline. And all the preedit styling options of input methods are  ignored.

At least the underline should be there. One should have some indication what is in preedit and what is not. Without that ibus becomes quite hard to use.

See attached video how this looks like.



Actual Results:  
No preedit styling

Expected Results:  
There should be some preedit styling, at least an underline at the minimum.

Comment 1 Mike FABIAN 2023-09-05 17:26:29 UTC
Created attachment 1987076 [details]
Video showing the problem

Using 

- ibus-m17n with hi-itrans
- ibus-anthy
- ibus-typing-booster

Comment 2 Mike FABIAN 2023-09-05 17:34:29 UTC
One can also see in the video that switching between input method, no matter whether with Super+space or with the panel menu is super slow.
After a switch from one input method to another, the icon of the old input method in the panel remains for a long time. Even the preedit of the old input method sometimes lingers for a long time. It seems like sometimes a focus change is needed to trigger the input method change.

Comment 3 fujiwara 2023-09-06 08:30:21 UTC
(In reply to Mike FABIAN from comment #2)
> One can also see in the video that switching between input method, no matter
> whether with Super+space or with the panel menu is super slow.
> After a switch from one input method to another, the icon of the old input
> method in the panel remains for a long time. Even the preedit of the old
> input method sometimes lingers for a long time. It seems like sometimes a
> focus change is needed to trigger the input method change.

It's another know issue. Since Wayland does not support a global keybinding, ibus-daemon checks the key events for Super-space and sends a D-Bus signal to the panel but there are too many key events of Super-space and some D-Bus signals are ignored for key release events.
The workaround is to type any keys after you type Super-space.

Comment 4 fujiwara 2023-09-06 08:37:21 UTC
I thought this would be a know issue of a Wayland specification likes https://gitlab.gnome.org/GNOME/mutter/-/issues/153
But IBus has the different behavior between GNOME and Plasma and I now noticed input-method protocol v1 supports the preedit style according to text-input v1 protocol. GNOME uses text-input v3 and seems the preedit style was deleted in v3. Interesting.

Thus, this issue can be fixed with input-method v1 in Plasma Wayland.

Comment 5 fujiwara 2023-09-07 07:01:35 UTC
Now I added IBusAttrPreedit which implements https://github.com/ibus/ibus/wiki/Wayland-Colors
https://github.com/fujiwarat/ibus/blob/wayland-preeedit-color/src/ibusattribute.h#L97

Wayland text-input protocol V1 provides a few semantics and IBus consolidates IBUS_ATTR_PREEDIT_ERROR_SPELLING and IBUS_ATTR_PREEDIT_ERROR_COMPOSE.
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/text-input/text-input-unstable-v1.xml?ref_type=heads#L251

Comment 6 Fedora Update System 2023-09-07 07:06:53 UTC
FEDORA-2023-0aec0b18ac has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0aec0b18ac

Comment 7 Fedora Update System 2023-09-08 01:34:57 UTC
FEDORA-2023-0aec0b18ac has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-0aec0b18ac`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-0aec0b18ac

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-09-18 00:15:43 UTC
FEDORA-2023-0aec0b18ac has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.