Bug 489057 - With Fcitx "show input method info when switching input focus" setting, when entering plasma panel editing mode, the editing mode jumps out immediately
Summary: With Fcitx "show input method info when switching input focus" setting, when ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Edit Mode (show other bugs)
Version: 6.1.1
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
: 485183 488855 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-23 16:18 UTC by elgoognojks
Modified: 2024-08-22 21:00 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elgoognojks 2024-06-23 16:18:53 UTC
SUMMARY
When entering plasma panel editing mode, the editing mode jumps out immediately

For recent 1 week maybe, when I right-click at kde plasma panel/Enter edit mode, the edit mode only lasts for miniseconds and automatically jumps back to normal working mode.
When I reboot into X11 mode, this bug disappears.

STEPS TO REPRODUCE
1. Boot in Wayland environment
2. right-click any KDE Plasma desktop panel

OBSERVED RESULT
the edit mode only lasts for miniseconds and automatically jumps back to normal working mode.

EXPECTED RESULT
the screen should stay at edit mode until I press [x]

SOFTWARE/OS VERSIONS
Linux: Garuda linux
KDE Plasma: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
video of bug: https://photos.app.goo.gl/PSG5WSnE18SfzmPQ8
Comment 1 Nate Graham 2024-06-25 22:33:24 UTC
Cannot reproduce the issue by following the steps in the video. Does it happen in a new clean user account on the same machine? This could rule out any local configuration issues.
Comment 2 elgoognojks 2024-06-26 08:09:46 UTC
(In reply to Nate Graham from comment #1)
> Cannot reproduce the issue by following the steps in the video. Does it
> happen in a new clean user account on the same machine? This could rule out
> any local configuration issues.

Yes, you are right. In a fresh new ordinary user account on the same laptop, the behavior of the right-click on panel/Enter edit mode is normal. Wish this gives a hint about what is going on in the erroneous original user account.
Comment 3 elgoognojks 2024-06-26 08:32:08 UTC
Also, I found a difference.
In the original user account where "Enter edit mode" is malfunction, after trying entering edit mode the journal log in the KSystemLog emerged 2 new entries:
```
plasmashell  file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/configuration/PanelConfiguration.qml:536:9: QML SpinBox: Binding loop detected for property "implicitWidth"

plasmashell	file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/ConfigOverlay.qml:328:17: QML SpinBox: Binding loop detected for property "implicitWidth"
```
, which do not exist after successfully entering edit mode in the fresh user account

I compared PanelConfiguration.qml and ConfigOverlay.qml between the erroneous account, the fresh account (the file should be the same, right?), and from another laptop also running Garuda linux with same KDE Plasma version, and found no difference in the file.

Hope these info help.
Thank you.
Comment 4 Nate Graham 2024-06-26 15:03:32 UTC
Ah, the binding loop issue. I think this should be fixed in Plasma 6.1.1; can you test again with that version?
Comment 5 elgoognojks 2024-06-28 01:36:13 UTC
(In reply to Nate Graham from comment #4)
> Ah, the binding loop issue. I think this should be fixed in Plasma 6.1.1;
> can you test again with that version?

Unfortunately, after upgrading to Plasma 6.1.1 today, the above bug and pattern remain the same.
"Binding loop detected for property "implicitWidth"" error in the erroneous account
No bug in the fresh account
QQ
Comment 6 elgoognojks 2024-06-29 06:55:17 UTC
I found one possible culprit!

Traditionally in order to use fcitx input method (e.g. mcbopomofo for Traditional Chinese in Taiwan) in Wayland + KDE Plasma, we need to go to Plasma setting/Keyboard/Virtual keyboard and set it to "Fcitx 5"
In the fresh test acccount, of course I did not do this.

Most importantly, for the original erroneous account, after I set Plasma setting/Keyboard/Virtual keyboard back to "None" (which is default for a new account), the "Enter edit mode" behavior resumed normal!

Hope this helps.
Comment 7 elgoognojks 2024-06-29 07:27:36 UTC
(In reply to elgoognojks from comment #6)
> I found one possible culprit!
> 
> Traditionally in order to use fcitx input method (e.g. mcbopomofo for
> Traditional Chinese in Taiwan) in Wayland + KDE Plasma, we need to go to
> Plasma setting/Keyboard/Virtual keyboard and set it to "Fcitx 5"
> In the fresh test acccount, of course I did not do this.
> 
> Most importantly, for the original erroneous account, after I set Plasma
> setting/Keyboard/Virtual keyboard back to "None" (which is default for a new
> account), the "Enter edit mode" behavior resumed normal!
> 
> Hope this helps.

I pinpointed a culprit setting.

In Plasma setting/Input Methods/Global options, there is a toggle box saying "show input method info when switching input focus" (or something like this because I only have Traditional Chinese version). I used to letting it checked.
Now after I uncheck it, the panel "Enter edit mode" resumed normal.

Ya now my concern is resolved. 
FYI.
Comment 8 Weng Xuetian 2024-07-12 15:54:50 UTC
@elgoognojks, this might be due to the fcitx wayland  im module need to display a popup on the application being typed, which may interfere with certain application logic.

However, using input method under wayland there is an alternative option, by using the wayland native input method protocol.

https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma

I'd consider that as an better setup for wayland.

Can you check if you make kwin starts fcitx (systemsettings -> virtual keyboard -> select fcitx 5), and unset QT_IM_MODULE, re-login, the issue still persist or not?
Comment 9 elgoognojks 2024-07-13 03:25:22 UTC
(In reply to Weng Xuetian from comment #8)
> @elgoognojks, this might be due to the fcitx wayland  im module need to
> display a popup on the application being typed, which may interfere with
> certain application logic.
> 
> However, using input method under wayland there is an alternative option, by
> using the wayland native input method protocol.
> 
> https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma
> 
> I'd consider that as an better setup for wayland.
> 
> Can you check if you make kwin starts fcitx (systemsettings -> virtual
> keyboard -> select fcitx 5), and unset QT_IM_MODULE, re-login, the issue
> still persist or not?

Thank you for replying.
However, for months ago I already set up fcitx within wayland the way you mentioned (set virtual keyboard to fcitx and did not set "QT_IM_MODULE" global variable in ~/.config/environment.d/*.conf), and the bug still happened today if I check "show input method info when switching input focus" (當切換輸入焦點時顯示輸入法資訊)
Comment 10 Weng Xuetian 2024-07-13 20:55:08 UTC
(In reply to elgoognojks from comment #9)
> (In reply to Weng Xuetian from comment #8)
> > @elgoognojks, this might be due to the fcitx wayland  im module need to
> > display a popup on the application being typed, which may interfere with
> > certain application logic.
> > 
> > However, using input method under wayland there is an alternative option, by
> > using the wayland native input method protocol.
> > 
> > https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma
> > 
> > I'd consider that as an better setup for wayland.
> > 
> > Can you check if you make kwin starts fcitx (systemsettings -> virtual
> > keyboard -> select fcitx 5), and unset QT_IM_MODULE, re-login, the issue
> > still persist or not?
> 
> Thank you for replying.
> However, for months ago I already set up fcitx within wayland the way you
> mentioned (set virtual keyboard to fcitx and did not set "QT_IM_MODULE"
> global variable in ~/.config/environment.d/*.conf), and the bug still
> happened today if I check "show input method info when switching input
> focus" (當切換輸入焦點時顯示輸入法資訊)

You're right. I also can reproduce this issue. Then I feel it's likely a kwin issue or sth.

Actually, it can also be triggered if there's a new app is opened in the background.

E.g. if you run "sleep 5; kwrite" in the background, and then enter the edit mode, the edit mode will end when kwrite is launched.

I wonder what's the motivation of this behavior, and maybe it should be changed to not do that if that's easier to implement.
Comment 11 Bug Janitor Service 2024-07-14 06:45:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6097
Comment 12 Weng Xuetian 2024-07-14 15:51:23 UTC
Git commit a16d98f4eb1b0912843217d13bbddbfa56eaa0ad by Weng Xuetian.
Committed on 14/07/2024 at 06:35.
Pushed by xuetianweng into branch 'master'.

Input method window should not break showing desktop

With recent change of using show desktop with plasma's edit mode,
wayland input method becomes unusable when trying to type in the search
box of widget explorer. This is because the input method window will
currently break showing desktop under wayland.

Under X11, an input method window is traditionally implemented as an
override redirect window. Under Wayland, the window should be treated
similarily, but now we have a special type for input method window.
FIXED-IN: 6.1

M  +1    -1    src/workspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/a16d98f4eb1b0912843217d13bbddbfa56eaa0ad
Comment 13 Weng Xuetian 2024-07-14 15:52:43 UTC
Git commit 7ab44a56e280b945a5d7af323c844ab0eabc986e by Weng Xuetian.
Committed on 14/07/2024 at 15:52.
Pushed by xuetianweng into branch 'Plasma/6.1'.

Input method window should not break showing desktop

With recent change of using show desktop with plasma's edit mode,
wayland input method becomes unusable when trying to type in the search
box of widget explorer. This is because the input method window will
currently break showing desktop under wayland.

Under X11, an input method window is traditionally implemented as an
override redirect window. Under Wayland, the window should be treated
similarily, but now we have a special type for input method window.
FIXED-IN: 6.1
(cherry picked from commit a16d98f4eb1b0912843217d13bbddbfa56eaa0ad)

M  +1    -1    src/workspace.cpp

https://invent.kde.org/plasma/kwin/-/commit/7ab44a56e280b945a5d7af323c844ab0eabc986e
Comment 14 Nate Graham 2024-07-27 03:40:44 UTC
*** Bug 488855 has been marked as a duplicate of this bug. ***
Comment 15 Nate Graham 2024-08-22 21:00:49 UTC
*** Bug 485183 has been marked as a duplicate of this bug. ***