11421 Commits

Author SHA1 Message Date
Mitchell Hashimoto
b011706aad suppressions 2025-07-27 14:12:26 -07:00
Mitchell Hashimoto
53c7b8922f apprt/gtk-ng: reload config 2025-07-27 13:57:28 -07:00
Mitchell Hashimoto
ccde429bde apprt/gtk-ng: toasts 2025-07-27 13:27:03 -07:00
Mitchell Hashimoto
18831374ca apprt/gtk-ng: fix scrolling on surface (#8080)
We forgot to specify the scroll controller's `flags` property.
2025-07-26 12:17:09 -07:00
Mitchell Hashimoto
b5c1f52ddb apprt/gtk-ng: fix scrolling on surface
We forgot to specify the scroll controller's `flags` property.
2025-07-26 12:13:51 -07:00
Mitchell Hashimoto
fd1db0c8e6 apprt/gtk-ng: new window menu action
Not sure why I skipped this one, its super easy.
2025-07-26 07:29:15 -07:00
Mitchell Hashimoto
c24aa0e9be update valgrind suppressions for a Linux wayland machine 2025-07-26 07:23:34 -07:00
Mitchell Hashimoto
b389171476 Add per-font size adjustment, don't adjust nf symbol font or emoji font; use non-Mono symbols nerd font (#7953)
This adds functionality for choosing different normalization metrics for
each fallback font. It's not exposed as a config option, but could be in
the future, which would probably go a long way towards addressing
concerns like #7929.

The currently available reference metrics are, in priority order:
`ic_width, ex_height, cap_height, line_height, em_size`. The default
value is `ic_width`.

By priority order, I mean that if the chosen metric is not defined in
the fallback font, we move to the next metric in the list---we don't
normalize by an estimated metric from the fallback font (however, we're
happy to use an estimated metric from the primary font, that's how
`ic_width` normalization between CJK and Latin fonts work). This extends
the pattern that was used between `ic_width` and `ex_height` in the
existing hardcoded rule. `line_height` is always defined, so the buck
stops there.

What motivated me to implement this was the fact that, with the existing
hardcoded rule, the embedded symbols-only Nerd Font was always scaled up
by a factor of 1.2, which turned out to be an important reason why it's
been difficult to make icon scaling work to everyone's satisfaction.
Accordingly, the symbols-only font is the first to take advantage of the
new functionality. If this PR is merged, #7917 is no longer needed. (To
limit the scope of this PR, it only includes the minimal changes to let
icon scaling take advantage of this functionality. I may submit a
follow-up PR with some further icon scaling improvement enabled by
this.)
2025-07-26 07:08:44 -07:00
Mitchell Hashimoto
fcbc58401f Upgrade hustcer/milestone-action to v2.9 (#8074)
Upgrade
[hustcer/milestone-action](https://github.com/hustcer/milestone-action)
to v2.9, [Release
Detail](https://github.com/hustcer/milestone-action/releases/tag/v2.9)

Fix the deprecated warning here:
https://github.com/ghostty-org/ghostty/actions/runs/16531137360/job/46756561930#step:3:37
2025-07-26 07:01:12 -07:00
Mitchell Hashimoto
bdf14cf29d gtk-ng: add ipc infrastructure and connect +new-window ipcs (#8069) 2025-07-26 07:00:59 -07:00
hustcer
259266223c Upgrade hustcer/milestone-action to v2.9 2025-07-26 11:57:13 +08:00
Jeffrey C. Ollie
ed584e769f gtk-ng: add ipc infrastructure and connect +new-window ipcs 2025-07-25 22:48:39 -05:00
Mitchell Hashimoto
858e705973 apprt/gtk-ng: window headerbar, maximize, fullscreen (#8071)
This ports over a basic headerbar, maximize, and fullscreen. The
headerbar only has the main menu button for now since we have no tabbing
or splits. The main menu has the full main menu that mainline GTK has
but most of it is disabled since we don't implement the actions yet.

I didn't use anything from your branch @tristan957 so I didn't add
coauthor but I want to note that @tristan957 worked on this as well and
I suspect there's overlap.
2025-07-25 20:45:41 -07:00
Mitchell Hashimoto
a8d0a84530 apprt/gtk-ng: hook up window close confirmation 2025-07-25 15:12:55 -07:00
Mitchell Hashimoto
a25a0011ea apprt/gtk-ng: more actions 2025-07-25 14:53:18 -07:00
Mitchell Hashimoto
7d33d39a45 blp formatting 2025-07-25 13:56:41 -07:00
Mitchell Hashimoto
7f2f603fbd apprt/gtk-ng: handle headerbar visibility by config 2025-07-25 13:52:12 -07:00
Mitchell Hashimoto
20b6d8ad79 gtk-ng: tell systemd when Ghostty is ready (#8070) 2025-07-25 13:36:45 -07:00
Mitchell Hashimoto
5fd7e0814d typos 2025-07-25 13:36:05 -07:00
Mitchell Hashimoto
7f3dda7ea4 apprt/gtk-ng: setup headervar-visible binding 2025-07-25 13:35:43 -07:00
Mitchell Hashimoto
6cf8007cf7 apprt/gtk-ng: toggle fullscreen and maximize 2025-07-25 13:17:13 -07:00
Jeffrey C. Ollie
95df073455 gtk-ng: tell systemd when Ghostty is ready 2025-07-25 15:16:50 -05:00
Mitchell Hashimoto
5b37e86391 apprt/gtk-ng: close surface, close window 2025-07-25 12:59:47 -07:00
Mitchell Hashimoto
f27fd0f550 apprt/gtk-ng: main menu button shouldn't focus 2025-07-25 12:47:26 -07:00
Mitchell Hashimoto
297e9cb8ab new suppressions to deal solely with showing the about window 2025-07-25 12:19:34 -07:00
Mitchell Hashimoto
02e6ef7e9b apprt/gtk-ng: setup action maps in app and window 2025-07-25 12:10:30 -07:00
Mitchell Hashimoto
e865535f6e apprt/gtk-ng: simple headerbar 2025-07-25 12:10:11 -07:00
Mitchell Hashimoto
b8dd767fe4 apprt/gtk: fix double-free if quit action is used (#8068)
This fixes a double-free that Valgrind found when the quit action was
used (the keybinding to quit or the menu item). This fixes it in both
the gtk and gtk-ng apprts.

The issue stems from the fact that our quit action worked by traversing
the toplevels and destroying all windows. When all windows are
destroyed, GTK exits the main loop.

When fcitx is used as the input method editor (IME), it appears to hold
its own `gtk.Window` widget as a property (probably for the IME popup).
Unfortunately this does not react well to being destroyed externally and
triggers a double-free when the IME widget also tries to dispose itself.

I think this is probably a bug somewhere in the GTK IME widget because
it should be resilient to this kind of destruction. But, we can't
tolerate a double free in the mean time.

We can still quit by destroying only OUR windows (which cascades to
destroy everything else).
2025-07-25 12:01:54 -07:00
Mitchell Hashimoto
a477921b80 apprt/gtk: fix double-free if quit action is used
This fixes a double-free that Valgrind found when the quit action was
used (the keybinding to quit or the menu item). 

The issue stems from the fact that our quit action worked by traversing the 
toplevels and destroying all windows. When all windows are destroyed,
GTK exits the main loop.

When fcitx is used as the input method editor (IME), it appears to hold
its own `gtk.Window` widget as a property (probably for the IME popup).
Unfortunately this does not react well to being destroyed externally and
triggers a double-free when the IME widget also tries to dispose itself.

I think this is probably a bug somewhere in the GTK IME widget because
it should be resilient to this kind of destruction. But, we can't
tolerate a double free in the mean time.

We can still quit by destroying only OUR windows (which cascades to
destroy everything else).
2025-07-25 11:53:22 -07:00
Qwerasd
92fa2228e9 font: use non-mono symbols nerd font for embedded symbols
I changed my mind, this is a pretty small change and relevant to the
intent of the PR. This brings the appearance of the embedded symbols
much closer to patched fonts.

With this, the sizes of most symbols are nearly identical to a patched
font, the only big difference is positioning (and TBH I think we do a
better job positioning than the patcher does, since we have knowledge
about the cell size).
2025-07-25 12:41:00 -06:00
Jeffrey C. Ollie
abfab82ef7 gtk-ng: add debug warning banner (#8057) 2025-07-25 13:18:58 -05:00
Qwerasd
6af6357949 font: clean up Collection api somewhat
Move size adjustment logic out of `Entry`, I understand the impulse to
put it there but it results in passing a lot of stuff around which isn't
great.

Rework `add(...)` in to `add(...)` and `addDeferred(...)`, faces are
passed directly now instead of passing an entry, and an options struct
is used instead of positional arguments for things like style, fallback,
and size adjustment.

Change size adjustment test back to a half pixel tolerance instead of 5%
because the previous commit (allowing fractional pixel sizes) fixed the
root cause of large differences.
2025-07-25 11:50:59 -06:00
Jeffrey C. Ollie
f390941fd6 gtk-ng: move debug property to window 2025-07-25 12:46:56 -05:00
Jeffrey C. Ollie
33135f19dc gtk-ng: add debug warning banner 2025-07-25 12:46:55 -05:00
Qwerasd
9405522dd5 font: allow fractional pixel sizes 2025-07-25 11:36:03 -06:00
Mitchell Hashimoto
3cdd6f4f5e apprt/gtk-ng: surface inheritance, new window (#8067)
This makes the `new_window` action properly inherit properties from the
parent surface that initiated the action. Today, that is only the pwd
and font size.
2025-07-25 10:29:45 -07:00
Mitchell Hashimoto
830d49c185 apprt/gtk-ng: surface inheritance, new window
This makes the `new_window` action properly inherit properties from the
parent surface that initiated the action. Today, that is only the pwd
and font size.
2025-07-25 10:17:08 -07:00
Mitchell Hashimoto
787960e56d apprt/gtk-ng: hook up bell ringing (#8065)
For now, this just emits a signal that an embedding widget will react to
to do something like flashing the window.

I think we should implement the audio bell in the actual surface view
but I don't currently have audio drivers hooked up in my Linux VM and
I'm away from my desktop PC. :)

cc @jcollie if you're interested, pretty tightly scoped.
2025-07-25 09:29:16 -07:00
Mitchell Hashimoto
b36b7031a1 apprt/gtk-ng: hook up bell ringing
For now, this just emits a signal that an embedding widget will react to
to do something like flashing the window. 

I think we should implement the audio bell in the actual surface view
but I don't currently have audio drivers hooked up in my Linux VM and
I'm away from my desktop PC. :)
2025-07-25 09:01:45 -07:00
Mitchell Hashimoto
6d6b911fad macos: add more Tahoe menu item icons from SF Symbols (#8050)
This is a follow up to https://github.com/ghostty-org/ghostty/pull/7594
<img width="487" height="318" alt="Screenshot 2025-07-24 at 23 10 20"
src="https://github.com/user-attachments/assets/83491b18-ef64-4a8f-b63d-a0001352cc31"
/>
<img width="544" height="295" alt="Screenshot 2025-07-24 at 23 11 01"
src="https://github.com/user-attachments/assets/10922879-ac1b-409d-8a3b-c298a1411813"
/>
2025-07-25 07:24:11 -07:00
Weizhao Ouyang
b7f6da7857 macos: add more Tahoe menu item icons from SF Symbols
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
2025-07-25 22:14:13 +08:00
Qwerasd
c0ee4a252a font: revert switch to non-mono symbols nerd font
This change might be good, but it is incomplete and not relevant to the
PR that it's a part of. I'll explore making this change separately after
this, since it might be a good idea.

(It's incomplete since the attribute data was not re-generated based on
the non-mono file.)
2025-07-24 17:52:41 -06:00
Qwerasd
2054a06533 cleanup
A variety of naming, commenting, and formatting improvements + a few
explicit error sets. This commit has no functional changes, though it
does remove a couple functions that didn't really need to exist.
2025-07-24 17:48:57 -06:00
trag1c
03ea024bc1 i18n: Updated translation for nl_NL (#8040) 2025-07-24 21:29:40 +02:00
Mitchell Hashimoto
8016e0be6d Fix tab titles not being preserved with window-save-state (#8037)
Fixes #7938



https://github.com/user-attachments/assets/766a5d7a-f660-428f-b82b-3eafea83eff3
2025-07-23 16:48:35 -07:00
Mitchell Hashimoto
70f6e8b03f apprt/gtk-ng: surface progress bar (#8045)
Straightforward port of existing functionality. No memory leaks
detected.
2025-07-23 16:39:19 -07:00
Mitchell Hashimoto
00cce91dc4 apprt/gtk-ng: surface progress bar 2025-07-23 16:29:56 -07:00
Mitchell Hashimoto
eb3f3fff83 apprt/gtk-ng: keep child_exited property up to date 2025-07-23 16:03:27 -07:00
Mitchell Hashimoto
9a3239ba9f apprt/gtk-ng: child exited overlay (#8044)
This ports the child exited overlay.

We're able to use Zig comptime and Blueprint templates to use the same
Surface blueprint for this even if libadwaita is too old to support
banners (< 1.3) by inheriting from `gtk.Widget` instead and not
instantiating the blueprint. Its a bit noisy to maintain the `noop`
version but we should be able to test that compilation in CI (we do via
Debian 12).
2025-07-23 16:01:35 -07:00
Mitchell Hashimoto
cd664078ad apprt/gtk-ng: child exited overlay 2025-07-23 15:47:44 -07:00