Bug 438460 - Keyboard layout widget has no icon, doesn't respond to click and opens the widget on login
Summary: Keyboard layout widget has no icon, doesn't respond to click and opens the wi...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout (show other bugs)
Version: 5.22.0
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-11 12:05 UTC by Riccardo Robecchi
Modified: 2021-08-20 15:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma/5.22.3
Sentry Crash Report:


Attachments
Screenshot of the widget (50.26 KB, image/png)
2021-06-11 12:05 UTC, Riccardo Robecchi
Details
New screenshot under Plasma 5.22.1 (1.14 MB, image/png)
2021-06-15 18:56 UTC, Riccardo Robecchi
Details
plasma-org.kde.plasma.desktop-appletsrc (28.65 KB, text/plain)
2021-06-15 22:18 UTC, Riccardo Robecchi
Details
plasma-org.kde.plasma.desktop-appletsrc (5.54 KB, text/plain)
2021-06-18 15:18 UTC, Yaroslav Sidlovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Riccardo Robecchi 2021-06-11 12:05:17 UTC
Created attachment 139228 [details]
Screenshot of the widget

SUMMARY
After the update to 5.22, the keyboard layout widget has no icon/text anymore in the tray. On top of that, it opens a widget dialogue when I log in (one similar to the network manager, as you can see in the screenshot). 
If I click on the blank space where the icon should be, the widget opens and then I have to click on the text to switch to another layout; this is in contrast to the expected behaviour of a single click on the widget switching to another layout.

If I start Plasma from the terminal, these lines pop up:
file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/main.qml:16: TypeError: Value is undefined and could not be converted to an object
file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/main.qml:65: TypeError: Value is undefined and could not be converted to an object
file:///usr/share/plasma/plasmoids/org.kde.plasma.keyboardlayout/contents/ui/main.qml:58: TypeError: Value is undefined and could not be converted to an object


STEPS TO REPRODUCE
1. Start Plasma

OBSERVED RESULT
The widget exhibits the weird behaviour described above.

EXPECTED RESULT
The widget shows an icon, does not open on click and allows to cycle through layouts on click.

SOFTWARE/OS VERSIONS
Linux: KDE neon
KDE Plasma Version: 5.22.0
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Andrey 2021-06-11 14:45:24 UTC
Looks like layout applet's shortcut somehow got triggered, assuming you have set one.
Try to unset it in applet's settings and please report if it helps.
You can set the shortcut in Keyboard KCM instead.
Comment 2 Riccardo Robecchi 2021-06-11 16:25:52 UTC
(In reply to Andrey from comment #1)
> Looks like layout applet's shortcut somehow got triggered, assuming you have
> set one.
> Try to unset it in applet's settings and please report if it helps.
> You can set the shortcut in Keyboard KCM instead.

I did set a shortcut, but it was in the KCM. I un-set it and then set it back again and the bug appears not to appear anymore. Thank you for your help, Andrey! Is this a symptom that something wasn't quite right with my configuration or is it an issue with the applet itself?
Comment 3 Andrey 2021-06-11 16:40:55 UTC
The circumstances how it happened for you is still not clear to me. The only reason I'm aware of is bug 434713.
Let us know if it appear again somehow. Meanwhile, I'm marking it as duplicate.
Cheers!

*** This bug has been marked as a duplicate of bug 434713 ***
Comment 4 Riccardo Robecchi 2021-06-15 18:54:44 UTC
I am reopening the bug as it does not seem to be related, after all. After the update to Plasma 5.22.1, I experienced again the same error. The thing is, this time around I have no keyboard shortcut set (as you can see from the attached screenshot). No widget-specific keyboard shortcut (right-click → options → keyboard shortcut) has ever been set. This therefore completely excludes the relation to bug 434713.
Comment 5 Riccardo Robecchi 2021-06-15 18:56:21 UTC
Created attachment 139345 [details]
New screenshot under Plasma 5.22.1
Comment 6 Andrey 2021-06-15 19:25:24 UTC
Could you create new user and retest with minimal configuration changes from the default?
Comment 7 Driglu4it 2021-06-15 20:47:32 UTC
(In reply to Riccardo Robecchi from comment #4)
> I am reopening the bug as it does not seem to be related, after all. After
> the update to Plasma 5.22.1, I experienced again the same error. The thing
> is, this time around I have no keyboard shortcut set (as you can see from
> the attached screenshot). No widget-specific keyboard shortcut (right-click
> → options → keyboard shortcut) has ever been set. This therefore completely
> excludes the relation to bug 434713.

Please check your /home/%user_name%/.config/plasma-org.kde.plasma.desktop-appletsrc for string with shortcut for layoutswitcher widget and let know if is present.
Comment 8 Riccardo Robecchi 2021-06-15 22:18:40 UTC
Created attachment 139354 [details]
plasma-org.kde.plasma.desktop-appletsrc

(In reply to Driglu4it from comment #7)
> (In reply to Riccardo Robecchi from comment #4)
> > I am reopening the bug as it does not seem to be related, after all. After
> > the update to Plasma 5.22.1, I experienced again the same error. The thing
> > is, this time around I have no keyboard shortcut set (as you can see from
> > the attached screenshot). No widget-specific keyboard shortcut (right-click
> > → options → keyboard shortcut) has ever been set. This therefore completely
> > excludes the relation to bug 434713.
> 
> Please check your
> /home/%user_name%/.config/plasma-org.kde.plasma.desktop-appletsrc for string
> with shortcut for layoutswitcher widget and let know if is present.

Nothing turns out. You can find the file attached.

(In reply to Andrey from comment #6)
> Could you create new user and retest with minimal configuration changes from
> the default?

I will do this as soon as possible.
Comment 9 Yaroslav Sidlovsky 2021-06-17 11:12:18 UTC
I'm able to reproduce this bug after doing this steps:
1. Click "Configure System Tray...";
2. On "General" tab change "Panel icon size" to "Scale with Panel height" and apply new settings;
3. Execute `plasmashell --replace &` in the console;
4. Watch how keyboard layout applet got activated after plasma restart.

Looks like on my PC bug appeared after update to plasma-5.22.1.
Comment 10 Yaroslav Sidlovsky 2021-06-17 11:14:45 UTC
P.S. I've using plasma with X11 window system.
Comment 11 Andrey 2021-06-17 20:54:18 UTC
Marco, do you have idea what can activate the applet on login?
Comment 12 Riccardo Robecchi 2021-06-17 21:42:41 UTC
(In reply to Yaroslav Sidlovsky from comment #9)
> I'm able to reproduce this bug after doing this steps:
> 1. Click "Configure System Tray...";
> 2. On "General" tab change "Panel icon size" to "Scale with Panel height"
> and apply new settings;
> 3. Execute `plasmashell --replace &` in the console;
> 4. Watch how keyboard layout applet got activated after plasma restart.
> 
> Looks like on my PC bug appeared after update to plasma-5.22.1.

I can confirm this behaviour on my install. I selected "Panel icon size → small" and the widget started behaving normally again.
Comment 13 Yaroslav Sidlovsky 2021-06-18 15:18:30 UTC
Created attachment 139494 [details]
plasma-org.kde.plasma.desktop-appletsrc

This bug can be reproduced with this config file.
Just copy it to ~/.config and replace old one. Don't forget to do backup.
Comment 14 Bug Janitor Service 2021-06-23 14:44:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/513
Comment 15 Andrey 2021-06-24 11:12:34 UTC
(In reply to Yaroslav Sidlovsky from comment #9)
> I'm able to reproduce this bug after doing this steps:
> 1. Click "Configure System Tray...";
> 2. On "General" tab change "Panel icon size" to "Scale with Panel height"
> and apply new settings;
> 3. Execute `plasmashell --replace &` in the console;
> 4. Watch how keyboard layout applet got activated after plasma restart.
> 
> Looks like on my PC bug appeared after update to plasma-5.22.1.

To make it reproducible, one probably need to hide some icons from systray also.
In my case, following was enough in .config/plasma-org.kde.plasma.desktop-appletsrc:
hiddenItems=org.kde.plasma.volume,org.kde.plasma.networkmanagement,org.kde.plasma.clipboard
Comment 16 Andrey 2021-06-25 12:11:12 UTC
Git commit 948fb7d5a383b839b9978c4d1312d3a728f5d686 by Andrey Butirsky, on behalf of Yuriy Saurov.
Committed on 25/06/2021 at 12:10.
Pushed by butirsky into branch 'master'.

[keyboard layout applet] Fix auto-opening fullRepresentation on start

M  +44   -42   applets/keyboardlayout/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/948fb7d5a383b839b9978c4d1312d3a728f5d686
Comment 17 Andrey 2021-06-28 10:56:23 UTC
Git commit bc1e9920115b7cf6eae78db3a4ce82f2c4f48d5c by Andrey Butirsky, on behalf of Yuriy Saurov.
Committed on 28/06/2021 at 10:56.
Pushed by butirsky into branch 'Plasma/5.22'.

[keyboard layout applet] Fix auto-opening fullRepresentation on start


(cherry picked from commit 948fb7d5a383b839b9978c4d1312d3a728f5d686)

M  +44   -42   applets/keyboardlayout/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/bc1e9920115b7cf6eae78db3a4ce82f2c4f48d5c