Bug 402681 - Inconsistencies when clicking on tray titles
Summary: Inconsistencies when clicking on tray titles
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.14.4
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-29 17:38 UTC by Sefa Eyeoglu
Modified: 2020-06-10 13:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sefa Eyeoglu 2018-12-29 17:38:21 UTC
SUMMARY
When opening tray menus the "go back"-function (clicking on the title) behaves inconsistent depending on the action before.
For example: Opening the network-applet, then switching to sound, then switching to media player and then clicking on the title closes the tray entirely, where as just opening the network applet and then clicking the title behaves correctly.

STEPS TO REPRODUCE
1. Open the network applet
2. Switch to some other applets without closing the tray
3. Click on the title of the applet

OBSERVED RESULT
Tray closes completely

EXPECTED RESULT
Tray should switch to the "more" menu

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux rolling, Linux 4.19.12-zen1-1-zen
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5-12-0

ADDITIONAL INFORMATION
I recorded that behavior and uploaded it to YouTube: https://youtu.be/iHFX8wzEam8
Comment 1 Nate Graham 2019-01-01 01:07:35 UTC
Confirmed the steps to reproduce with 5.14.4 and git master
Comment 2 Konrad Materka 2019-07-26 18:15:57 UTC
I tested it with 5.16.3, sometimes it goes to "more" menu as expected, sometimes it just closes. Looks random.
Comment 3 Konrad Materka 2019-07-30 08:23:45 UTC
There is a race condition in the code:
1. ExpandedRepresentation.qml, line 84 - hides applet, shows dialog with hidden ("more") items
2. PlasmoidItem.qml, line 81 - hides dialog with hidden ("more") items when applet is hidden
It is random, to reproduce:
1. open applet from the system tray and click on the title
2. repeat point 1 several times to get different outcomes (there is no need to open different applet)

Even without race condition title click behavior is inconsistent:
1. When there are no hidden items click on the title will show empty list
2. Why should it go to hidden items, even if you click on active one?
Comment 4 Nate Graham 2020-06-10 13:35:34 UTC
Git commit 1669197b33f388b9a4d7f8fae66d725c62d026ee by Nate Graham.
Committed on 10/06/2020 at 13:35.
Pushed by ngraham into branch 'master'.

[applets/systemtray] Use a grid for the hidden items view

This improves the applet in a variety of ways:
- Much more touch friendly than the current skinny list view
- Many more items can be displayed without needing to scroll
- Substantial code simplification
- UI improvement from no longer sometimes showing an awkward vertical
  strip of icons that was invisibly scrollable but some of whose items
  ate scroll events, and which pushed the header over to the left in a
  somewhat random-looking way
FIXED-IN: 5.20

M  +7    -16   applets/systemtray/package/contents/ui/CurrentItemHighLight.qml
M  +64   -97   applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
M  +16   -19   applets/systemtray/package/contents/ui/HiddenItemsView.qml
M  +27   -10   applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +0    -1    applets/systemtray/package/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/commit/1669197b33f388b9a4d7f8fae66d725c62d026ee