-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong portal is used for org.freedesktop.portal.Settings
#710
Comments
Oh, some previous mentions of this issue here: elementary/settings-daemon#38 (review) |
As far as I understand, portals are iterated, and whenever one returns a value, that value is considered final. As a potential solution: perhaps iterating portals with a matching |
One big problem here that I discovered later - is that regardless of which portal will actually be used, all of them will notify on changes, passing their own values as the parameter. |
That was done in #670.
This is only a problem if there's some process that change the value that the backend use right? for example, in elementary, even with the GTK backend build from master, it will never emit the SettingChanged for color-scheme because there isn't any process that try to change it. |
Well, if you use gsettings cli to change the GNOME gsettings key, it will emit a change with the value from gsettings and apps will switch. Then you'll have to toggle the elementary pref back and forth to reset it. The way I found it was via the fact https://gitlab.gnome.org/exalm/color-scheme-simulator was sorted after the gtk portal - and so you get the gtk value on startup but simulator values on changes... |
My portal is simply named It's also the only one with a matching |
I think part of the issue here is that the GTK portal returns On gnome, the gnome portal will handle this setting. The gtk portal is expected to run on other non-gnome platforms, and should not set any preference of its own. Or am I missing something here? I'm mostly asking because I wonder if it also calls the |
You can run
Right now, it's use the However, maybe the issue for your backend is that it return an uint instead of an variant holding an uint. the portal should be ignoring it and asking the next backend.
the portal don't set the key by itself but only notifies when it change, so, unless the user or program/script changed it, the portal won't emit the |
That was the issue, my code was returning I'll try to add some details from these responses to the docs for the settings portal. It should help both client and server implementations.
Oh, that's nice to know. |
Oh, thanks for the guidance here, this is fixed. |
I've a portal of my own handling Settings:
And have set up the GTK portal to handle only filechooser and a few other interfaces (but not settings):
The correct desktop is also set:
But when querying the the desktop portal, it seems to be fetching the value from the gtk portal.
It seems that
xdg-desktop-portal
is using the gtk portal, even though my setup explicitly sets another one as preferred. At least the value matches that.As extra confirmation, if I stop
xdg-desktop-portal-gtk.service
, and then run$ dbus-send --print-reply=literal --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read string:org.freedesktop.appearance string:color-scheme
,xdg-desktop-portal-gtk.service
is auto-started again.The text was updated successfully, but these errors were encountered: