Bug 391612 - Needed: flag for wallpaper plugins to tell if screenlocker-ready (QWidget usage)
Summary: Needed: flag for wallpaper plugins to tell if screenlocker-ready (QWidget usage)
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 14:04 UTC by Friedrich W. H. Kossebau
Modified: 2023-01-03 14:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2018-03-09 14:04:57 UTC
While it is possible to reuse Plasma Wallpaper plugins for the lock screen, that one has some limitations, both technically and by policy:

a) ScreenLocker::UnlockApp is a QGuiApplication instance only, so wallpaper plugins which use QWidgets internally (e.g. due to no proper refactoring yet done for reusing those classes to render the QML item).
So such plugins work nicely in the workspace and also can be selected by the user for the lock screen. Just at runtime they will fail there, resulting in the "please help yourself to unlock things calling loginctl" screen. Not good.

Example is the Marble worldmap wallpaper plugin. Sadly that one was broken for some time due to a mismatch between installation dir name and wallpaper plugin id), so it did not show up in wallpaper selection lists. But that got fixed now after 17.12.3, and so starting with KDE Apps 18.04 people will run into this issue.

No idea how such a flag could look like, might need more examples to decide about it.
Other option would be to make ScreenLocker::UnlockApp a QApplication again. Not sure what the price of that is though?

b) There is the plan to only allow wallpaper plugins which do not access remote places. So wallpaper plugins would need to mark what they need.

But doing this only by a flag would be the same as using a flag for marking apps not-a-trojaner: being the app creator setting this flag means nothing :) And given people can download and install wallpaper plugins from across the internet, one better should not trust the flag.

So perhaps it should rather be some admin-only task to add wallpaper plugins to a whitelist for the screen locker, and less a flag?

So, possibly QWidget-usage challenge is something which needs independent handling.
Comment 1 Friedrich W. H. Kossebau 2021-03-11 19:22:18 UTC
Not really a feature wish, but a bug in the design: you can add QWidget-using wallpaper plugins for the lockscreen, and things are broken.

Rereading I notice there was a typo in the initial text, it should have been:
"
a) ScreenLocker::UnlockApp is a QGuiApplication instance only, so wallpaper plugins which use QWidgets internally (e.g. due to no proper refactoring yet done for reusing those classes to render the QML item) will fail badly.
"
Comment 2 David Edmundson 2023-01-03 11:07:11 UTC
At this point widget apps in wallpapers can just be declared unsupported. We already have a flag for if they can be used in the screenlocker