Skip to content

gtk: Open URIs with portals - #11754

Merged
jcollie merged 4 commits into
ghostty-org:mainfrom
tdgroot:openuri
Mar 23, 2026
Merged

jcollie merged 4 commits into
ghostty-org:mainfrom
tdgroot:openuri

Conversation

@tdgroot

@tdgroot tdgroot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

This is a continuation of the solid work done by @jcollie in PR #7864. I checked with him if I could take over to continue the implementation.

His changes of last year have been adapted to be compatible with the current GTK implementation. Aside from just "making it work", I also dived into the portals and OpenURI implementation and made some improvements there.

Notable improvements were:

  • Improved lifecycle management of glib resources in the OpenURI implementation
  • More forgiving error handling in OpenURI implementation by adding more fallbacks
  • Fixed some memory leaks
  • Less memory allocations in Portals implementation
  • Added tests for building the Portals request path

Fixes #5991

tdgroot added 3 commits March 22, 2026 18:17
- Token is formatted without allocation
- Reusable function for formatToken
- Tests in portal.zig are actuall included now
@tdgroot
tdgroot requested a review from a team as a code owner March 22, 2026 20:26
@ghostty-vouch

ghostty-vouch Bot commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Hi @tdgroot, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

@ghostty-vouch ghostty-vouch Bot closed this Mar 22, 2026
@mitchellh

Copy link
Copy Markdown
Contributor

!vouch

ghostty-vouch Bot pushed a commit that referenced this pull request Mar 22, 2026
@ghostty-vouch ghostty-vouch Bot mentioned this pull request Mar 22, 2026
ghostty-vouch Bot added a commit that referenced this pull request Mar 22, 2026
Triggered by
[comment](#11754 (comment))
from @mitchellh.

Vouch: @tdgroot

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mitchellh mitchellh reopened this Mar 22, 2026
@jcollie jcollie added this to the 1.4.0 milestone Mar 23, 2026
@jcollie jcollie added the gtk Issues exclusive to GTK which are not OS-specific label Mar 23, 2026

@jcollie jcollie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, otherwise LGTM.

Comment thread src/apprt/gtk/class/application.zig Outdated

@jcollie jcollie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending CI

@jcollie
jcollie merged commit 374ed27 into ghostty-org:main Mar 23, 2026
76 checks passed
@tdgroot
tdgroot deleted the openuri branch March 23, 2026 20:16
anhoder pushed a commit to anhoder/ghostty that referenced this pull request Mar 28, 2026
Triggered by
[comment](ghostty-org#11754 (comment))
from @mitchellh.

Vouch: @tdgroot

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
christmic pushed a commit to christmic/Sylvander that referenced this pull request Aug 12, 2026
Triggered by
[comment](ghostty-org/ghostty#11754 (comment))
from @mitchellh.

Vouch: @tdgroot

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gtk Issues exclusive to GTK which are not OS-specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GTK: use portals to open URLs instead of xdg-open

3 participants