Milkshiift / GoofCord

:shield: Take control of your Discord experience with GoofCord – the highly configurable and privacy minded discord client.
Open Software License 3.0
113 stars 5 forks source link

[BUG] Missing ibus input capability in the Flatpak distribution #24

Open EPOCHvoyager opened 2 weeks ago

EPOCHvoyager commented 2 weeks ago

Description

While using an ibus input method such as an IME - in my case, Anthy for typing Japanese characters - the actual character transformation functionality is completely non-functional under the Flatpak distribution.

Steps to Reproduce

Simply adding an IME Input Source in GNOME Settings' 'Keyboard' section should reproduce this issue - they're the ones featuring the little cog icon. While I'm using Anthy due to personal preference(though it is also the one that's shipped with upstream Fedora), Mozc is generally more popular - and also has an ibus package available. Change the Input Source through the panel menu, or press Super + Space.

Expected Behavior

While using an Anthy, the Latin characters you'll be typing are the transliterated equivalent of the actual characters/words you are trying to write(for example, you may type 'ko' for the Japanese character 'こ'). You might attempt to convert further this current underlined portion by pressing Space, which will open up a list of conversion options - something like a smartphone keyboard's word suggestions. You can always press Enter to move on to the next word, and Ctrl + Space to toggle between direct Latin character input and IME behavior.

Actual Behavior

The program completely ignores ibus input - meaning only direct Latin input works, regardless of input source.

Environment

Additional Information

I've observed the same behavior under every Electron-based Discord client I've tried, including Armcord, so it is likely an issue with an incompatibility and/or misconfiguration of Flatpak sandboxing.

EPOCHvoyager commented 2 weeks ago

Congrats on GoofCord, by the way. Fastest client I've tried as of yet.

Milkshiift commented 2 weeks ago

Does this occur specifically in the flatpak distribution?

Milkshiift commented 2 weeks ago

Do you have examples of working flatpak apps?

EPOCHvoyager commented 2 weeks ago

Does this occur specifically in the flatpak distribution?

I was fairly certain of so when writing due to the Flatpak sandbox, but I've now downloaded the AppImage version to be sure:

image

Do you have examples of working flatpak apps?

Of the ones that I've used - Firefox, LibreWolf, Brave, Signal(Electron), Buffer, and Stremio all work with ibus. For an example of a non-working one, there's the Bitwarden Flatpak - which I believe also uses Electron.

Milkshiift commented 1 week ago

This seems to be due to this Chromium bug https://issues.chromium.org/issues/40113488 Try running GoofCord with --gtk-version=4, --enable-wayland-ime (separately) or disabling the Wayland socket for GoofCord through, for example, Flatseal. Signal works because by default it runs in XWayland mode, which doesn't have the issue

EPOCHvoyager commented 1 week ago

Tried both launch flags, no avail. Disabling the Wayland socket makes GoofCord fail to launch with the following error:

[2:0622/162232.964059:ERROR:wayland_connection.cc(200)] Failed to connect to Wayland display: No such file or directory (2)
[2:0622/162232.964073:ERROR:ozone_platform_wayland.cc(265)] Failed to initialize Wayland platform
[2:0622/162232.964077:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.
[0622/162232.966857:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)

Setting --ozone-platform-hint=x11 with the Wayland socket disabled leads to this other error:

[2:0622/162442.512663:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[2:0622/162442.512672:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.
[0622/162442.515330:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
Milkshiift commented 1 week ago

Try enabling the Wayland socket and running with --ozone-platform-hint=x11

EPOCHvoyager commented 1 week ago

Same outcome:

[2:0622/172324.386460:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[2:0622/172324.386469:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.
[0622/172324.389299:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)