Skip to content
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

portal-impl: Use fallback portals for Settings as well #1358

Merged
merged 2 commits into from
Oct 30, 2024

Commits on Oct 30, 2024

  1. portal-impl: Use fallback portals for Settings as well

    Since 1.18.2, we have a hardcoded fallback to xdg-desktop-portal-gtk as
    a last resort if no other portal is defined by a configuration file.
    This fallback mechanism, however, isn't implemented for the
    org.freedesktop.impl.portal.Settings interface.
    
    The consequence is that everything seems to work just fine, but user
    preferences like color scheme are ignored in applications that use the
    portal API to retrieve them (not just flatpak apps, also libadwaita
    apps). That comes as a surprise to users; and since the portal stuff
    otherwise works fine, it's not entirely straightforward to figure out
    that configuring portal.conf would fix it.
    
    I believe that if find_portal_implementation implements fallbacks, so
    should find_all_portal_implementations, for consistency and to avoid
    surprises.
    
    The fallback logic this commit implements closely resembles the logic in
    find_portal_implementation: we don't look for fallbacks if there is a
    portal configured in portals.conf (or if portals.conf explicitly says
    there should be none), and we only use the x-d-p-gtk as a last resort if
    we haven't found any impl(s) using the legacy UseIn key.
    
    (The above should be a self-contained description but there's some
    additional thoughts at
    flatpak#1199 (comment))
    
    Fixes: d18c563 ("portal-impl: Hard-code x-d-p-gtk as a last-resort fallback")
    Related: flatpak#1102
    liskin authored and GeorgesStavracas committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    380521d View commit details
    Browse the repository at this point in the history
  2. portal-impl: Cosmetics

    liskin authored and GeorgesStavracas committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    d717078 View commit details
    Browse the repository at this point in the history