PolyMeilex / rfd

Rusty File Dialog
MIT License
526 stars 60 forks source link

Use portals by default #130

Closed orowith2os closed 4 months ago

orowith2os commented 11 months ago

It can be safely assumed that a system has portals by default; if they don't, many things will simply fail to work, including, but not limited to, the dark mode preference and many other freedesktop settings.

Those that absolutely refuse to use D-Bus will thus end up with an unusable system in the first place, if they want to use anything desktop-related. So enabling the portal backend by default is fine.

GTK will, of course, fall back to using the portals if it's running inside of a Flatpak environment, but it requires manual workarounds outside of one. And, of course, having a library depend on GTK when it's more or less unnecessary isn't ideal.

Closes (although it's already closed) https://github.com/PolyMeilex/rfd/issues/99

PolyMeilex commented 11 months ago

Not going to merge this until #66 is resolved (it is mostly implemented already https://github.com/PolyMeilex/rfd/blob/master/src/backend/linux/zenity.rs but needs to be wired in as a fallback).

You'd be surprised how many people actually use those "unusable systems". Just recently, me merging settings portal code in sctk-adwaita caused startup time problems for some users of winit, because people use portal setups so broken that any calls to them result in ~30s delay (xdg portal simply times out after that period as it can't find or communicate with *-impl portal). So those cases are even worse than people without portal setup whatsoever.

It's supper annoying, but those people exist and there is nothing we can do about that.

orowith2os commented 11 months ago

We can tell them to fix their systems.

PolyMeilex commented 4 months ago

Zenity is now used as a fallback for broken systems, so this is good to go now! :rocket: