[applets/systemtray] Fix invisible plasmoid icons when Media Player is added
ClosedPublic

Authored by kmaterka on May 1 2020, 5:33 PM.

Details

Summary

After adding a new plasmoid (applet), for example a new Media Player, several empty icons are rendered in the system tray which hides existing icons.
The bug occurs after opening Gwenview while the Media Player applet is NOT in use.
The systray icons reappear when Gwenview is closed or another source starts playing.

BUG: 418662

Test Plan

Start Gwenview when Media Player is not in use. All icons should render correctly.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kmaterka created this revision.May 1 2020, 5:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 1 2020, 5:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kmaterka requested review of this revision.May 1 2020, 5:33 PM
kmaterka retitled this revision from [applets/systemtray] Fix ivisible plasmoid icons when new plasmoid added to [applets/systemtray] Fix invisible plasmoid icons when Media Player is added.May 1 2020, 5:35 PM

This fix should go with Plasma 5.19, if it is not too late (code freeze).

apol added a subscriber: apol.May 1 2020, 11:36 PM
apol added inline comments.
applets/systemtray/package/contents/ui/main.qml
92 ↗(On Diff #81698)

Why's this needed?

kmaterka added inline comments.May 2 2020, 8:26 AM
applets/systemtray/package/contents/ui/main.qml
92 ↗(On Diff #81698)

This is needed to fix different bug. I will create a separate patch for this.

kmaterka updated this revision to Diff 81724.EditedMay 2 2020, 8:28 AM

Extract unrelated fix to a separate patch: D29356

5.19 hasn't branched yet, so code landed in master will still make it there.

With this patch, I still see Media Player itself with a blank icon after opening Gwenview. Is that expected?

applets/systemtray/package/contents/ui/items/ItemLoader.qml
33

"Illegal" is one of those scary words we try not to use, even in console spew. Consider changing this to "Invalid."

5.19 hasn't branched yet, so code landed in master will still make it there.

Maybe there was code freeze for frameworks? Or 5.18.5? Never mind :)

With this patch, I still see Media Player itself with a blank icon after opening Gwenview. Is that expected?

This is a separate issue... :/ I will work on that and create separate fix.

applets/systemtray/package/contents/ui/items/ItemLoader.qml
33

Old habits from Java world (IllegalStateException), I will change that.

kmaterka updated this revision to Diff 81842.May 4 2020, 8:29 AM

Change warning message

mart accepted this revision.May 4 2020, 9:42 AM
This revision is now accepted and ready to land.May 4 2020, 9:42 AM
This revision was automatically updated to reflect the committed changes.

Separate Bug 420993 created for Media Player icon not rendering correctly.