You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GTK: use portals to open URLs instead of xdg-open #5991
I'm wondering if we should have a "global" indicator on the GTK App structure to indicate if portals are in use on the system running Ghostty. I'd prefer not to repeat the "slowness" accusations that we had because we were using a synchronous dbus call to get the system theme. With a global like that we could failover fast to calling xdg-open.
I'm wondering if we should have a "global" indicator on the GTK App structure to indicate if portals are in use
How would you determine that?
That I'm not sure about yet. Probably send a query to the portal at app init and if we don't get a response or get an error set the indicator to false.
I don't think people are going to complain about their open_url taking a few milliseconds longer ðĪ·
On some people's systems it takes seconds for the DBus call to timeout instead of erroring out nearly instantly. That's why we had problems with the dark/light detection when we went public. Don't care to repeat that. Just saying that this will take some investigation.
I don't think people are going to complain about their open_url taking a few milliseconds longer ðĪ·
On some people's systems it takes seconds for the DBus call to timeout instead of erroring out nearly instantly. That's why we had problems with the dark/light detection when we went public. Don't care to repeat that. Just saying that this will take some investigation.
I'm pretty sure libadwaita already has a synchronous dbus call in the init path, fyi
I don't think people are going to complain about their open_url taking a few milliseconds longer ðĪ·
It doesn't have to be synchronous. You can kick off an asynchronous call, and if you get an open URL request in the mean time you can fallback to xdg-open. It's highly unlikely someone will open a URL that fast (and in the case of a timeout, you'd eventually fallback there anyways).
(Edit: I mean adding portal detection on the initial path. But I haven't done research yet to see if there is a better way to detect it)
Activity
jcollie commentedon Feb 25, 2025
I'm wondering if we should have a "global" indicator on the GTK App structure to indicate if portals are in use on the system running Ghostty. I'd prefer not to repeat the "slowness" accusations that we had because we were using a synchronous dbus call to get the system theme. With a global like that we could failover fast to calling
xdg-open.tristan957 commentedon Feb 26, 2025
How would you determine that?
jcollie commentedon Feb 26, 2025
That I'm not sure about yet. Probably send a query to the portal at app init and if we don't get a response or get an error set the indicator to false.
tristan957 commentedon Feb 26, 2025
I don't think people are going to complain about their
open_urltaking a few milliseconds longer ðĪ·jcollie commentedon Feb 26, 2025
On some people's systems it takes seconds for the DBus call to timeout instead of erroring out nearly instantly. That's why we had problems with the dark/light detection when we went public. Don't care to repeat that. Just saying that this will take some investigation.
tristan957 commentedon Feb 26, 2025
I'm pretty sure libadwaita already has a synchronous dbus call in the init path, fyi
mitchellh commentedon Jul 7, 2025
It doesn't have to be synchronous. You can kick off an asynchronous call, and if you get an open URL request in the mean time you can fallback to
xdg-open. It's highly unlikely someone will open a URL that fast (and in the case of a timeout, you'd eventually fallback there anyways).(Edit: I mean adding portal detection on the initial path. But I haven't done research yet to see if there is a better way to detect it)
gtk: Open URIs with portals (ghostty-org#11754)