Bug 393630 - System tray icons not clickable and collapsible when an entry's visibility is changed to hidden
Summary: System tray icons not clickable and collapsible when an entry's visibility is...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.14.4
Platform: unspecified Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
: 394397 396153 396947 397947 398372 398592 399574 401485 401558 401566 402967 403907 404437 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-29 02:24 UTC by Raj Amal
Modified: 2019-08-09 23:25 UTC (History)
39 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.14.5.1, 5.15.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raj Amal 2018-04-29 02:24:20 UTC
When the visibility of a system tray entry is changed from Auto to hidden, the rest of the visible icons are not clickable and the expanded hidden icons popup cannot be closed via down arrow icon.

To replicate,

1. Open System tray settings
2. Select clipboard visibility to hidden and apply.
3. Now try clicking any other visible icons like Network or Wifi, it just expands the hidden icons instead of opening the specific system tray setting.

Temporary fix,
Reboot fixes this issue.

OS: Kubuntu 18.04
Comment 1 Patrick Silva 2018-05-05 16:41:32 UTC
cannot reproduce on Arch Linux, plasma 5.12.5.
Comment 2 Nate Graham 2018-05-26 23:30:54 UTC
I can reproducibly trigger this in the following manner on Plasma 5.12.4:

1. Have Dropbox installed
2. Right-click on arrow > System Tray Settings > Entries > mark Dropbox as Hidden
3. Click on Ok button
4. Plasmashell crashes (Bug 394729)
5. After plasma re-launches, quit and restart Dropbox
6. Right-click on the System Tray arrow > System Tray Settings
7. Dropbox has disappeared from this list! (Bug 361613)
8. Click Ok
9. Click on the System Tray arrow
10. Click on it again

Now the expanded pop-up no longer closes on the second click. Sometimes it doesn;t open, either, but that part isn't 100% reproducible for me.

The issue disappears if I remove dropbox's entry from ~/.config/plasma-org.kde.plasma.desktop-appletsrc and restart plasmashell.
Comment 3 Nate Graham 2018-05-26 23:31:00 UTC
*** Bug 394397 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Surrel 2018-05-28 11:19:22 UTC
I am able to repoduce this together with https://bugs.kde.org/show_bug.cgi?id=390890 on Archlinux with 5.12.5, and with a vanilla dev-unstable docker image.
Comment 5 Thomas Surrel 2018-06-08 20:18:01 UTC
I tried to track down this problem. It seems that in systemtray/package/contents/ui/ConfigEntries.qml, as soon as we access plasmoid.rootItem, something wrong happens and the next time we try to access anything in the system tray, plasmashell crash or the system tray just hangs.

Is plasmoid.rootItem the right way to access this ? I have a hard time finding documentation about that ...
Comment 6 Alexander M. 2018-06-19 13:08:01 UTC
Can reproduce this on Arch with plasma 5.13, also consistently triggers Bug 390890.
Comment 7 Patrick Silva 2018-09-16 19:27:02 UTC
*** Bug 396947 has been marked as a duplicate of this bug. ***
Comment 8 Alexander Mentyu 2018-09-24 14:11:02 UTC
*** Bug 397947 has been marked as a duplicate of this bug. ***
Comment 9 Alexander Mentyu 2018-09-24 14:16:35 UTC
*** Bug 396153 has been marked as a duplicate of this bug. ***
Comment 10 Antonio Rojas 2018-09-24 14:55:59 UTC
*** Bug 398592 has been marked as a duplicate of this bug. ***
Comment 11 Likivik 2018-09-25 21:00:43 UTC
Related to/Possible duplicates of) this bug: Bug 398372, Bug 397949, Bug 390890.
Comment 12 Nate Graham 2018-09-25 21:02:06 UTC
*** Bug 398372 has been marked as a duplicate of this bug. ***
Comment 13 Patrick Silva 2018-10-10 00:17:42 UTC
*** Bug 399574 has been marked as a duplicate of this bug. ***
Comment 14 Łukasz Konieczny 2018-10-11 18:01:08 UTC
I can confirm this bug. When i click "configure system tray" and change visibility of any icon in tray to any option, be it "auto", or "hidden" or "shown", then all icons in tray are not clickable, which means that clicking any icon brings the same popup like when clicking small arrow on the right side of the tray. If I click "configure system tray" again and choose "entries" again, there are no entries on the list!
Comment 15 Łukasz Konieczny 2018-10-11 18:05:59 UTC
My system is openSUSE Tumbleweed and Plasma version is 5.14.0.
Comment 16 Robert Griffiths 2018-10-19 09:54:36 UTC
Still happens in Neon Dev Stable 5.14.1, FW 5.52.0, Qt 5.11.1.

The easiest way I have found way to reproduce is:
1. Right click System Tray up arrow
2. Click Configure System Tray
3. Select Entries
4. Change any entry from Shown etc to another state and Click Apply.
5. Try to left click a System Tray entry (e.g.) browser plugin.
The result will be the Status and Notifications instead.
It seems that when I try selecting something i.e. browser plugin, this will replace Status and Notifications as the erroneous popup.

Temporary fix: kquitapp5 plasmashell && plasmashell &
Comment 17 Robert Griffiths 2018-10-19 09:59:19 UTC
the erroneous popup ... the next time I try clicking a System Tray item (i.e if I try going to Configure Entries again (and they are gone this time) then the next time I click something in the System Tray the popup will be the last one I tried instaed of Notifications. It seeme to revert back with little effort (i.e. just clicking a couple of entries on System Tray).
Comment 18 Patrick Silva 2018-11-05 22:17:00 UTC
more problems related to this bug, I think:
open system tray settings
click "entries" section
click "cancel" button to close the window
copy/move some big file to another partition/device:
notification applet indicating data transfer progress does not unhide in the system tray;
play some video/audio with some player (I tested VLC): media player applet does not show up in the system tray.
Comment 19 Michael K. 2018-11-07 07:57:43 UTC
No icons are hidden here so there's no system tray down button.
When it happens some of the icons work permanently (remmina, telegram) others very occasionally but mostly never (network, clipboard, sound, kconnect, devices, printer, monitor settings). Instead I'm getting the empty "system & notifications" 'popdown'.
And the keepassxc icon isn't shown anymore.

Running Solus Plasma 3.9999 with KDE 5.14.2 on 5.51.0 framework and qt 5.11.2

Thanks to Robert Griffiths for the temp. workaround!
Comment 20 trmdi 2018-11-09 08:47:22 UTC
It seems that the bug is "triggered" when ConfigEntries.qml reads "plasmoid.rootItem"...
Comment 21 trmdi 2018-11-09 08:59:42 UTC
(In reply to trmdi from comment #20)
> It seems that the bug is "triggered" when ConfigEntries.qml reads
> "plasmoid.rootItem"...

An easy way to reproduce the bug:
1, edit ConfigGeneral.qml: add Component.onCompleted: console.log(plasmoid.rootItem) into the root Item.
2, reload systemtray
3, Open systemtray's configuration window > close it without doing anything else
4, The bug appears
Comment 22 trmdi 2018-11-10 03:36:55 UTC
Zren, can you have a look at this?
Comment 23 Chris Holland 2018-11-10 20:25:38 UTC
I can reproduce the bug by modifying ConfigGeneral.qml.
I can also reproduce the bug by simply opening the ConfigEntries.qml tab too without modifying ConfigGeneral.qml.

Copy the *private* systemtray code to the home dir so we can edit without root.

    cp -r /usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray ~/.local/share/plasma/plasmoids/

Luckily, we can easily reproduce by testing in `plasmoidviewer`, which speeds testing up!

    QML_DISABLE_DISK_CACHE=true plasmoidviewer -a org.kde.plasma.systemtray

`plasmoid.rootItem` is apparently a way to access the "main" qml item of the widget (TIL). I'm not certain if any of the changes in appletquickitem.cpp since April 2018 (when this bug was first submitted) would cause this bug. I do remember that the fullRepresentation is preloaded now (so that it opens faster on the first click), which might be why this bug appeared. In any case, this is the first time I've seen `plasmoid.rootItem` used.

* https://github.com/KDE/plasma-framework/blame/master/src/plasmaquick/appletquickitem.cpp#L877

When the bug is active, I noticed that when I was able to expand the system tray (like if I clicked the triangle thingy), hovering any of the listed items caused this warning:

    file:///home/chris/.local/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/AbstractItem.qml:87: TypeError: Cannot read property 'hoveredItem' of null

Testing with:

    // AbstractItem.qml
    onContainsMouseChanged: {
        if (hidden && containsMouse) {
            console.log('AbstractItem.onContainsMouseChanged.abstractItem', abstractItem)
            console.log('\t root', root)
            console.log('\t hiddenLayout', root.hiddenLayout)
            console.log('\t hoveredItem', root.hiddenLayout.hoveredItem)
            root.hiddenLayout.hoveredItem = abstractItem
        }
    }


Gave me:

    qml: AbstractItem.onContainsMouseChanged.abstractItem PlasmoidItem_QMLTYPE_192(0x564eb3803b40)
    qml:     root QQuickMouseArea_QML_141(0x564eb3138f60)
    qml:     hiddenLayout null
    file:///home/chris/.local/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/AbstractItem.qml:87: TypeError: Cannot read property 'hoveredItem' of null

So it appears that `main.hiddenLayout` aliased to => `ExpandedRepresentation.hiddenLayout` aliased to => `HiddenItemsView.layout` aliased to => `Column { id: hiddenTasksColumn }` is returning null after the bug takes effect.

I made a video of the bug here: (I didn't solve the bug so feel free to stop watching after 5min)
https://www.youtube.com/watch?v=DdOtE9FIqfg#t1m49
Comment 24 trmdi 2018-11-11 04:53:46 UTC
Nice video Zren. I always like your analyses.
Comment 25 trmdi 2018-11-11 07:05:54 UTC
After close the Config window (which reads plasmoid.rootItem)
- If you don't click on an Item -> all root's properties are still valid. 
- - Next, if (and only if) you click on an Item -> all root's properties become undefined.
- - - Next, if you open the Config window again, then close it (don't click on any Item), all root's properties come back.

you can test by add a Timer into root like this:
>    Timer {
>        interval: 1000; running: true; repeat: true
>        onTriggered: console.log("main: ", root.iconSizes)
>    }


Why?
Comment 26 contacha 2018-11-14 15:27:50 UTC
Workaround (kind of): configure system tray > entries > always show all entries

Also: I have two computers, both running latest KDE Neon, both with the same programs installed (I think) and one computer is unaffected by the issue. Settings one each PC are slightly different.
Comment 27 Nate Graham 2018-11-27 22:13:36 UTC
*** Bug 401485 has been marked as a duplicate of this bug. ***
Comment 28 Thomas Surrel 2018-11-30 09:40:31 UTC
*** Bug 401558 has been marked as a duplicate of this bug. ***
Comment 29 trmdi 2018-11-30 12:06:25 UTC
*** Bug 401566 has been marked as a duplicate of this bug. ***
Comment 30 alt.su-7oon2u5b 2018-12-26 06:56:13 UTC
Still happening (latest stable Neon). The entry visibility doesn't even have to be changed for the sys tray to break. Just open the sys tray customization window, switch to the Entries tab, and then close the customization window (X).
Comment 31 trmdi 2019-01-07 11:51:20 UTC
*** Bug 402967 has been marked as a duplicate of this bug. ***
Comment 32 Nate Graham 2019-01-19 03:38:12 UTC
I can no longer reproduce this as of https://commits.kde.org/plasma-workspace/0885170daf56fbb2d5558ae271bb44043a76d018 (e.g. in the 5.15 Beta). Can anyone else reproduce?
Comment 33 Patrick Silva 2019-01-19 14:29:25 UTC
I can reproduce with plasma 5.15 beta on Arch Linux following the steps below:

1. Open System tray settings
2. Select clipboard visibility to hidden, click "Ok" button.
3. Now try clicking any other visible icons like Network or Wifi, it just expands the hidden icons instead of opening the specific system tray setting.
Comment 34 Antonio Rojas 2019-01-19 17:10:02 UTC
I confirm that this is still broken in 5.15 beta
Comment 35 trmdi 2019-02-04 01:56:11 UTC
*** Bug 403907 has been marked as a duplicate of this bug. ***
Comment 36 Nate Graham 2019-02-08 15:42:36 UTC
Git commit 6fcf9a5e03ba573fd0bfe30125f4c739b196a989 by Nate Graham, on behalf of Tranter Madi.
Committed on 08/02/2019 at 15:37.
Pushed by ngraham into branch 'Plasma/5.14'.

Fix System Tray popup interactivity after echanging item visiblity

Summary:
Avoid using `plasmoid.rootItem` in SystemTray's ConfigEntries.qml.
FIXED-IN: 5.14.6

Reviewers: #plasma, ngraham, broulik, davidedmundson, anthonyfieroni, fvogt

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D18805

M  +22   -5    applets/systemtray/package/contents/ui/ConfigEntries.qml

https://commits.kde.org/plasma-workspace/6fcf9a5e03ba573fd0bfe30125f4c739b196a989
Comment 37 Patrick Silva 2019-02-15 21:24:53 UTC
still reproducible with plasma 5.15 :(

(In reply to Patrick Silva from comment #33)
> I can reproduce with plasma 5.15 beta on Arch Linux following the steps
> below:
> 
> 1. Open System tray settings
> 2. Select clipboard visibility to hidden, click "Ok" button.
> 3. Now try clicking any other visible icons like Network or Wifi, it just
> expands the hidden icons instead of opening the specific system tray setting.
Comment 38 Antonio Rojas 2019-02-15 22:05:42 UTC
(In reply to Patrick Silva from comment #37)
> still reproducible with plasma 5.15 :(
> 

The 5.15.0 tars were already made when the fix went in. It should be in 5.15.1
Comment 39 trmdi 2019-02-16 13:56:36 UTC
*** Bug 404437 has been marked as a duplicate of this bug. ***
Comment 40 Alexander 2019-05-28 17:48:12 UTC
This bug is still present on Kubuntu LTS. Is it normal?
Because of this bug I moved from Neon to Kubuntu LTS in autumn. Back on those times the panel with system tray just crashed and restarted after editing tray icons visibility which was tolerable. But recently, after some updates it stopped crashing and just sustain it's broken, unclickable condition. Now I must logout-login after editing tray icons.
Will it be fixed for Kubuntu 18.04 LTS?
Comment 41 Christoph Feck 2019-05-28 19:45:35 UTC
> This bug is still present on Kubuntu LTS. Is it normal?

Yes. This bug has been fixed since Plasma 5.15.1, and Kubuntu 18.04 uses Plasma 5.12.
Comment 42 Chris Holland 2019-08-09 23:25:58 UTC
There seems to be a Plasma 5.12.9 release on Tue 2019-09-10 according to:
https://community.kde.org/Schedules/Plasma_5

It doesn't look like the https://phabricator.kde.org/D18805 patch to avoid `plasmoid.rootItem` was backported to the Plasma 5.12 branch.

https://github.com/KDE/plasma-workspace/blob/Plasma/5.12/applets/systemtray/package/contents/ui/ConfigEntries.qml#L236

I'm not sure how long after Sept 10 it would take for Kubuntu 18.04.__ to get the bugfix release. Would it land before Kubuntu 20.04?