Bug 420993 - Invisible Media Player icon in System Tray
Summary: Invisible Media Player icon in System Tray
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Konrad Materka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-04 10:36 UTC by Konrad Materka
Modified: 2020-05-25 22:19 UTC (History)
2 users (show)

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


Attachments
Screenshot from Nate who is also affected (75.93 KB, image/png)
2020-05-04 10:36 UTC, Konrad Materka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Materka 2020-05-04 10:36:01 UTC
Created attachment 128130 [details]
Screenshot from Nate who is also affected

SUMMARY
This is an random issue. Sometimes when Media Player start for the first time Media Player icon is not rendered. I tested with Gwenview - when it is started and not playing icon of Medial Player is sometimes not rendered.

This is related to Bug 418662, but not the same.

STEPS TO REPRODUCE
1. Do not play anything (no Medial Player icon at all)
2. Run Gwenview
3. Check if Medial Player icon in hidden view is rendered correct.

OBSERVED RESULT
Sometimes icon is not rendered, looks like invisible or fully transparent.

EXPECTED RESULT
Icon rendered correctly.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.18
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Comment 1 Nate Graham 2020-05-04 13:41:38 UTC
Can reproduce.
Comment 2 Konrad Materka 2020-05-24 09:56:40 UTC
Fix in: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/14
Comment 3 Konrad Materka 2020-05-25 22:17:45 UTC
Git commit 2ce60f4e502a29e7ce468fc9796fa5088a3486f6 by Konrad Materka.
Committed on 25/05/2020 at 22:17.
Pushed by kmaterka into branch 'Plasma/5.19'.

[applets/systemtray] Lazy initialize SystemTray model

Summary:
SystemTray model was created in constructor, delay initialization and
create it lazily.
The `SystemTray::appletAdded` signal is connected to both SystemTray's
model and `Container`. `Container` must be connected first, because it sets
some properties of newly added applet: `visible` to false and `parent`
to the root item (container). If `Container` is connected second, then
newly created applet ios added to the model and rendered, but immediately
after that `Container` changes visibility to false.

Test Plan:
1. Do not play anything (no Medial Player icon at all)
2. Run Gwenview
3. Check if Medial Player icon in hidden view is rendered correct.
Before change:
Sometimes icon is not rendered, looks like invisible or fully transparent.
After change:
Icon rendered correctly.

M  +27   -15   applets/systemtray/systemtray.cpp
M  +4    -2    applets/systemtray/systemtray.h

https://invent.kde.org/plasma/plasma-workspace/commit/2ce60f4e502a29e7ce468fc9796fa5088a3486f6