https://bugs.kde.org/show_bug.cgi?id=493098

            Bug ID: 493098
           Summary: [Wayland + fcitx5] The active input language is
                    sometimes ignored after switching workspace
    Classification: Plasma
           Product: kwin
           Version: 6.1.5
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: input
          Assignee: kwin-bugs-n...@kde.org
          Reporter: jo...@skold.cc
  Target Milestone: ---

SUMMARY
Unsure if this is a misbehaving wayland protocol or an fcitx5 bug, but this
seemed like a good place to start given that it includes multiple
windows/workspaces. I'm using fcitx5 in a wayland session. In system settings:

- Keyboard > Keyboard > Layouts: Only Swedish present
- Keyboard > Virtual Keyboard: Fcitx 5 is selected
- Input Method > Input Method Off: Keyboard - Swedish
- Input Method > Input Method On:
    - Keyboard - English (US) - German, Swedish and Finnish (US)
    - Anthy
- Input Method > Select system layout...: Swedish
- Input Method > Configure global options...:
    - Share Input State: No
    - Show Input Method Information when switch [sic] input method: checked
    - Show Input Method Information when changing focus: checked

I run a terminal emulator on workspace 2. I switch fcitx5 over to using the US
layout in that terminal emulator. I switch active workspace to workspace 1,
where firefox gets focus. I then switch focus back to workspace 2, giving the
terminal emulator focus again. The fcitx5 popup says the active input layout is
now US, but if I start typing it's actually using Swedish (my default). I am
also unable to change the fcitx5 layout using the hotkey combo for switching
layouts.

This happens with kitty, wezterm, and foot. It does not happen with konsole for
some reason, which correctly keeps using the active US layout (maybe because it
uses Qt?). It also happens with some non-terminal emulators, like neovide.

In kitty: It correctly uses the active US layout until I press backspace, at
which point it stops using it and I start inputting Swedish (with fcitx5 still
having US as active layout).
In foot, wezterm, and neovide: It usually stops working immediately, but
sometimes it uses the right layout for a single key press before breaking.

With all four of them, if I alt+tab to another window and alt+tab back, it
sometimes fixes itself until the next time I change active workspace. Other
times I have to try a few times and/or change the input layout again.

Perhaps more interestingly, it only appears to stop working if the workspace I
switch to in between has a GTK app active. If I have firefox active on
workspace 1, it breaks. Likewise with gparted and VLC. But it does _not_ break
if I have dolphin active, nor ark. It also does not break if I switch focus to
any of those applications when on the same workspace, it has to be on another
workspace.

STEPS TO REPRODUCE
1. Set your input layout to Swedish
2. Enable fcitx5
3. Setup fcitx5 to use Swedish by default, with a secondary US layout as per my
settings above
4. Launch firefox on workspace 1, and wezterm, or foot on workspace 2 (easier
repro than kitty for some reason)
5. Have firefox focused and switch to workspace 2
6. Change input layout with fcitx5 to the secondary US layout instead of the
primary Swedish layout
7. Press the button that would produce a left bracket ([) on a US layout, and
see that it does produce one
8. Switch workspace to workspace 1
9. Switch workspace to workspace 2
10. Note that the fcitx5 popup says the US layout is active
11. Press some combination of the two square brackets and backspace

OBSERVED RESULT
The terminal emulator eventually starts getting å and " produced instead of
square brackets

EXPECTED RESULT
It should be inputting only square brackets

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Endeavour OS (rolling release), Linux 6.10.7-lqx1-1-lqx
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to