Bug 501098 - Falkon's location bar and web search bar don't work with Fcitx5 on Wayland
Summary: Falkon's location bar and web search bar don't work with Fcitx5 on Wayland
Status: REPORTED
Alias: None
Product: Falkon
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-05 13:06 UTC by Anna
Modified: 2025-03-08 04:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch to comment out the lines causing this bug (1.72 KB, patch)
2025-03-05 13:09 UTC, Anna
Details
Patch to comment out the most offending places in locationcompleter.cpp (1.37 KB, patch)
2025-03-05 13:14 UTC, Anna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anna 2025-03-05 13:06:41 UTC
SUMMARY

In Falcon's location bar, only first symbol (or first IME candidate) is entered correctly, and then:

* "Ctrl + Space" keybinding does nothing instead of cycling input methods (note: this keybinding is not default).
* "Super + Space" keybinding emits a space character instead of cycling input method groups (note: this keybinding is not default).
* Every next character is typed not using the current input method, but with the system keyboard layout configured in Fcitx for the current group.

Web search bar also has this issue, but to the lesser extent. I can type more characters before this issue appears.

STEPS TO REPRODUCE

Type "asdf asdf" in the location bar.

Case 1: Current input method is "Russian" keyboard, system keyboard layout configured for its Fcitx group is also Russian.
Case 2: Current input method is "Russian" keyboard, system keyboard layout configured for its Fcitx group is English (US).
Case 3: Current input method is Pinyin, system keyboard layout configured for its Fcitx group is English (US).

OBSERVED RESULT

Case 1: фыва фыва
Case 2: фsdf asdf
Case 3: 爱上对方asdf 

EXPECTED RESULT

Case 1: фыва фыва
Case 2: фыва фыва
Case 3: 爱上对方爱上对方

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.17
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.4-gentoo (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD FX-8320E Eight-Core Processor
Memory: 11.6 ГиБ of RAM
Graphics Processor: NVD9

ADDITIONAL INFORMATION

I configured Fcitx5 on Wayland using this guide:
https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland

I have two groups:

1) Group 1:

System keyboard layout: "English (US)"

Enabled input methods:
a. "English (US)" keyboard
b. Pinyin

2) Group 2.

System keyboard layout: also "English (US)", so keybindings still work no matter what group is currently active.

Enabled input methods:
a. "Russian" keyboard
Comment 1 Anna 2025-03-05 13:09:59 UTC
Created attachment 179142 [details]
Patch to comment out the lines causing this bug

I found two lines in the code (one in locationbar.cpp, another in websearchbar.cpp), commenting them out completely fixes the problem for me.
Comment 2 Anna 2025-03-05 13:14:40 UTC
Created attachment 179143 [details]
Patch to comment out the most offending places in locationcompleter.cpp

I tried to investigate more in locationcompleter.cpp, and this problem almost disappears if I comment out these two places.

If I leave QTimer even with an empty lambda, the issue persists. So my guess is that it's some concurrency/threading kind of issue.
Comment 3 Juraj 2025-03-07 17:19:56 UTC
Hello,
Have you tried to disable the incline completion and search suggestions?
Comment 4 Anna 2025-03-08 04:12:26 UTC
(In reply to Juraj from comment #3)
> Hello,
> Have you tried to disable the incline completion and search suggestions?

Yes, I've tried disabling everything.