Bug 2058976

Summary: ibus input into chromium-browser does not work in Wayland
Product: [Fedora] Fedora Reporter: Mike FABIAN <mfabian>
Component: chromiumAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: mfabian, spotrh, tfujiwar, than, tkonishi, tpopela, yaneti
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-17 11:07:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Video on Gnome (Wayland) showing that ibus input does not work in chromium-browswer
none
Video on Gnome (Xorg) showing that ibus input works in chromium-browser none

Description Mike FABIAN 2022-02-27 12:15:48 UTC
- Fedora-Workstation-Live-x86_64-36-20220216.n.0.iso installed in qemu-kvm
- Additional desktops (KDE, XFCE, ...) installed with “dnf groupinstall”
- chromium-96.0.4664.110-7.fc36.x86_64 is installed

When using a desktop using Wayland, I cannot type with ibus into the chromium-browser:

- Gnome or Plasma(Wayland) desktop: input with ibus into Chromium does *not* work
- Gnome (Xorg) or Plasma(Xorg) desktop: input with ibus into Chromium *does* work.

Comment 1 Mike FABIAN 2022-02-27 12:25:34 UTC
Created attachment 1863475 [details]
Video on Gnome (Wayland) showing that ibus input does not work in chromium-browswer

This video shows that input with ibus on Gnome (Wayland) does not work in chromium-browser although it works find in firefox and gnome-terminal.

Comment 2 Mike FABIAN 2022-02-27 12:30:26 UTC
Created attachment 1863476 [details]
Video on Gnome (Xorg) showing that ibus input works in chromium-browser

This video shows that input with ibus on Gnome (Xorg) *does* work in chromium-browser, firefox, and gnome-terminal.

Comment 3 Mike FABIAN 2022-06-17 15:44:38 UTC
If chromium is started like this:

    GTK_IM_MODULE=ibus chromium-browser --gtk-version=4

Then ibus input into chromium in a Gnome Wayland session works!

Comment 4 Mike FABIAN 2022-06-17 15:52:53 UTC
When using the workaround mentioned in comment#3 to start chromium like

    GTK_IM_MODULE=ibus chromium-browser --gtk-version=4

and ibus >= 1.5.27 and ibus-typing-booster >= 2.16.1 is used, then one can see in the debug log of typing booster that the reporting of the client name doesn’t work correctly in case of chromium.

When the focus switches to chromium the following is printed to the debug.log:

mfabian@fedora ~]$ tail -F .local/share/ibus-typing-booster/debug.log | grep focus
2022-06-17 17:44:00,275 hunspell_table.py line 6236 do_focus_out_id DEBUG: object_path=/org/freedesktop/IBus/InputContext_1
2022-06-17 17:44:00,277 hunspell_table.py line 6155 do_focus_in_id DEBUG: object_path=/org/freedesktop/IBus/InputContext_25 client=gtk4-im:(null)

I.e. the client is 'gtk4-im:(null)'.

In case of other gtk4-im clients, there is the client name after the :, like:

'gtk4-im:gnome-text-editor'

'gtk4-im:gnome-control-center'

Comment 5 fujiwara 2022-06-27 08:33:48 UTC
This is caused because chromium does not call g_set_prgname() with GTK4.
Normally it's called when g_application_run(). gtk_init() no longer suuport to parse argv in GTK4.

Comment 6 Than Ngo 2023-02-17 11:07:38 UTC
it should be fixed in chromium-110.0.5481.77