Implements Background portal, providing APIS related to applications running in the background.
Implemented according to: https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.impl.portal.Background.xml
davidedmundson | |
apol |
Plasma |
Implements Background portal, providing APIS related to applications running in the background.
Implemented according to: https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.impl.portal.Background.xml
Tested with manual invocations over DBus and checking what I return back through dbus-monitor.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
src/background.cpp | ||
---|---|---|
70 | I don't really understand why we're exposing this. Is it for contained apps? | |
134 | const QVariantMap map = { {QStringLiteral("result"), static_cast<uint>(result)} }; | |
195 | Will dbus look in autostart though? | |
208 | context should be [this] | |
211 | [this] | |
src/background.h | ||
80 | I'd call it windows, it's better not include the type. It will change to QVector with Qt6 anyway. |
src/background.cpp | ||
---|---|---|
70 | This is actually not API exposed to the clients, this is purely for xdg-desktop-portal needs, while the client interface (xdg-desktop-portal) has limited stuff available, see https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.Background.xml. | |
195 | Doesn't need to? I think it just specifies that the desktop file should ignore the exec line and start it through DBus (assuming correct dbus service file is installed etc.). Or am I wrong? |
src/background.cpp | ||
---|---|---|
195 | Ah, alright. |
This change, as committed does not appear to compile:
https://build.kde.org/view/Failing/job/Plasma/job/xdg-desktop-portal-kde/job/kf5-qt5%20FreeBSDQt5.14/lastFailedBuild/console
src/background.cpp | ||
---|---|---|
165 | From the docs Commandline to use add when autostarting at login. If this is not specified, the Exec line from the desktop file will be used. I can't see us doing that last part | |
195 |
You are right. We don't support it though. |
src/background.cpp | ||
---|---|---|
165 | The commandline is actually the Exec line, it's just named that way from the portal specification. You can see below: desktopEntryConfigGroup.writeEntry(QStringLiteral("Exec"), KShell::joinArgs(commandline)); |
Yes, I know why and didn't realize it. See the mail about PipeWire dependency on plasma-devel, I added you to CC list so you don't miss it.