flatpak / libportal

libportal - Flatpak portal library
https://libportal.org
GNU Lesser General Public License v3.0
82 stars 40 forks source link

How to detect the state of autostart background in libportal? #51

Closed Digitalone1 closed 7 months ago

Digitalone1 commented 3 years ago

Hello everyone.

Through libportal we can request to enable autostart for a specific app. But how can we check if the autostart is enabled for the same app?

Is there a specific method or process to detect it? I don't see any function to get it and even Gnome ToDo that implements this service is using a gsettings key to track the state rather than ask to libportal, which is not really ideal.

Am I missing something or this is not possible?

bilelmoussaoui commented 2 years ago

That is not possible from the Background portal implementation. See https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Background. If such thing has to be implemented in the libportal side, it has to be added first to https://github.com/flatpak/xdg-desktop-portal/