summaryrefslogtreecommitdiff
path: root/src/apprt
AgeCommit message (Collapse)Author
2025-10-11GTK fix quick terminal autohide (#9139)Brice
This is pretty much a direct port of the previous GTK app. still inside of the `isActive` handler for a window https://github.com/ghostty-org/ghostty/blob/7e429d73d6af65a397c6264b18ab60609ae8eefe/src/apprt/gtk/Window.zig#L822-L837 Fixes: https://github.com/ghostty-org/ghostty/discussions/9137
2025-10-11gtk: fix clicking on desktop notifications (#9146)Jeffrey C. Ollie
Clicking on desktop notifications sent by Ghostty _should_ cause the window that sent the notification to come to the top. However, because the notification that was sent targeted the wrong surface (apprt surface vs core surface) and the window did not call `present()` on itself the window would never be brought to the surface, the correct tab would not be selected, etc. Fixes #9145
2025-10-10gtk: better reporting for CSS parsing problems (#9129)Jeffrey C. Ollie
Log messages will include the problematic CSS, simplifying debugging. Especially helpful since some of our CSS is generated at runtime so it could be difficult to examine the CSS "source". ``` info(gtk_ghostty_application): loading gtk-custom-css path=/home/ghostty/dev/ghostty/x.css warning(gtk_ghostty_application): css parsing failed at <data>:2:3-14: gtk-css-parser-error-quark 4 No property named "border-poop" * { border-poop: 0; warning(gtk_ghostty_application): css parsing failed at <data>:1:3-3:1: gtk-css-parser-warning-quark 1 Unterminated block at end of document * { border-poop: 0; ``` vs: ``` info(gtk_ghostty_application): loading gtk-custom-css path=/home/ghostty/dev/ghostty/x.css warning(glib): WARNING: Gtk: Theme parser error: <data>:2:3-14: No property named "border-poop" warning(glib): WARNING: Gtk: Theme parser warning: <data>:1:3-3:1: Unterminated block at end of document ```
2025-10-10gtk: properly check for amount of time elapsed before notifying about ↵Jeffrey C. Ollie
command finish (#9128)
2025-10-10apprt/gtk: use configured title as fallback for closureComputedTitletlj
2025-10-06apprt/gtk: only close with no windows active if close delay is offMitchell Hashimoto
Fixes #9052
2025-10-06gtk: use std.Io.Writer to generate runtime CSSJeffrey C. Ollie
2025-10-03apprt/gtk: Zig 0.15 whack a moleMitchell Hashimoto
2025-10-03apprt/gtk: fix Zig 0.15Mitchell Hashimoto
2025-10-03Zig 0.15: build snapMitchell Hashimoto
2025-10-03Zig 0.15: zig build test macOSMitchell Hashimoto
2025-10-03Zig 0.15: zig build GTK exeMitchell Hashimoto
2025-10-03Zig 0.15: zig build test Mitchell Hashimoto
2025-10-03Zig 0.15: zig fmtMitchell Hashimoto
2025-10-03core: add 'command finished' notifications (#8992)Mitchell Hashimoto
Fixes #8991 Uses OSC 133 esc sequences to keep track of how long commands take to execute. If the user chooses, commands that take longer than a user specified limit will trigger a notification. The user can choose between a bell notification or a desktop notification.
2025-10-02gtk: improve signal handler managementJeffrey C. Ollie
Instead of making two separate passes over the surfaces in a split tree to manage signal handlers, do it in one pass.
2025-10-02gtk: fix duplicate signal handlersJeffrey C. Ollie
2025-10-02address review commentsJeffrey C. Ollie
2025-10-02core: add 'command finished' notificationsJeffrey C. Ollie
Fixes #8991 Uses OSC 133 esc sequences to keep track of how long commands take to execute. If the user chooses, commands that take longer than a user specified limit will trigger a notification. The user can choose between a bell notification or a desktop notification.
2025-09-30gtk: some bell features need to happen on receipt of every BELJeffrey C. Ollie
Some bell features should be triggered on the receipt of every BEL character, namely `audio` and `system`. However, Ghostty was setting a boolean to `true` upon the receipt of the first BEL. Subsequent BEL characters would be ignored until that boolean was reset to `false`, usually by keyboard/mouse activity. This PR fixes the problem by ensuring that the `audio` and `system` features are triggered every time a BEL is received. Other features continue to be triggered only when the `bell-ringing` boolean state changes. Fixes #8957
2025-09-29gtk: make Enter confirm "Change Terminal Title" (#8949)Mitchell Hashimoto
Fixes https://github.com/ghostty-org/ghostty/discussions/8697 by making `OK` the suggested default and activating it by default. Previously `OK` was `destructive` which imo is not a good approach for just setting a terminal title.
2025-09-29apprt/gtk: do not close window if tab overview is open with no tabsMitchell Hashimoto
Fixes #8944 When we drag the only tab out of the tab overview, this triggers an `n-pages` signal with 0 pages. If we close the window in this state, it causes both Ghostty to exit AND the drag/drop to fail. Even if we pre-empt Ghostty exiting by modifying the application class, the drag/drop still fails and the application leaks memory and enters a bad state. The solution is to keep the window open if we go to `n-pages == 0` and we have the tab overview open. Interestingly, if you click to close the final tab from the tab overview, Adwaita closes the tab overview so it still triggers the window closing behavior (this is good).
2025-09-29gtk: make Enter confirm "Change Terminal Title"Bernd Kaiser
2025-09-23comment to load standard css options before some of the user configured stylesBrice
2025-09-22load runtime css before user optionsrhodes-b
2025-09-22GTK Fix unfocused-split-fill (#8813)Mitchell Hashimoto
Attempts a resolution for https://github.com/ghostty-org/ghostty/discussions/8572 This matches the behavior of the old GTK apprt where unfocused-split-fill /opacity doesn't apply when there is only one active surface.
2025-09-22remove is_split properity in priv since it has a getter methodrhodes-b
2025-09-21use getter to notify is-split propertyrhodes-b
2025-09-21remove setIsSplit in surface classrhodes-b
2025-09-21bind is-split property between split_tree class and surface classrhodes-b
2025-09-21gtk: restore flatpak-aware resource directory supportLeorize
This was not ported to gtk-ng before old runtime was removed, breaking shell integration on Flatpak.
2025-09-20fix typorhodes-b
2025-09-20comment for the n_siblings surface memberrhodes-b
2025-09-20add n_siblings member, and when splits are created / removed update the ↵rhodes-b
number of siblings for the remaining nodes
2025-09-20fix surface blueprint formattingrhodes-b
2025-09-20fix comments to specific the config optionrhodes-b
2025-09-20apply unfocused-split with surface blueprintrhodes-b
2025-09-20rename setUnfocused to setUnfocusedFillrhodes-b
2025-09-20use focus signal in split_tree to determine if we apply unfocused-split-fillrhodes-b
2025-09-20worse way but its at least split aware, doesn't seem like the path forwardrhodes-b
2025-09-20unfocused-split-fill working again though it can't detect when its actually ↵rhodes-b
a split yet
2025-09-19stylistic changesMitchell Hashimoto
2025-09-19build: Add a new snap option and use it to build the snapMarco Trevisan (Treviño)
So we can limit the snap operations even at build time
2025-09-19gtk/surface: Filter out the SNAP variables by their contentsMarco Trevisan (Treviño)
When running in a snap context we need to filtering out all the SNAP_* variables out there, but this is not enough, because it's also needed to sanitize them by ensuring that no variable containing a path pointing to a $SNAP folder is leaked there. Otherwise we might have (for example) XDG_RUNTIME_DIRS containing a "private" snap path, and that will be exposed to all the applications that will be started from ghostty
2025-09-19build: move apprt, font, renderer enums to dedicated filesMitchell Hashimoto
This reduces the surface area of files we depend on for builds.
2025-09-19gtk: add glib log writer functionJeffrey C. Ollie
This will funnel GLib/GObject/GTK logging messages through Zig's logging system rather than just dumping them directly to stderr.
2025-09-19slightly improve logsعبد الرحمن صباهي
2025-09-11terminal: update parser to use new color parser and stream handlerMitchell Hashimoto
2025-09-05apprt/gtk: set the title on the window immediately if setMitchell Hashimoto
Fixes #5934 This was never confirmed to be a real issue on GTK, but it is theoretically possible and good hygience in general. Typically, we'd get the title through a binding which comes from a bindinggroup which comes from the active surface in the active tab. All of this takes multiple event loop ticks to settle, if you will. This commit changes it so that if an explicit, static title is set, we set that title on startup before the window is mapped. The syncing still happens later, but at least the window will have a title from the initialization.
2025-09-05apprt/gtk: don't use Stacked for surface error status pageMitchell Hashimoto
Fixes #8533 Replace the usage of `Stacked` for error pages with programmatically swapping the child of the `adw.Bin`. I regret to say I don't know the root cause of this. I only know that the usage of `Stacked` plus `Gtk.Paned` and the way we programmatically change the paned position and stack child during initialization causes major issues. This change isn't without its warts, too, and you can see them heavily commented in the diff. (1) We have to workaround a GTK template double-free bug that is well known to us: if you bind a template child that is also the direct child of the template class, GTK does a double free on dispose. We workaround this by removing our child in dispose. Valgrind verifies the fix. (2) We have to workaround an issue where setting an `Adw.Bin` child during a glarea realize causes some kind of critical GTK error that results in a hard crash. We delay changing our bin child to an idle tick.