Commit Graph

7096 Commits

Author SHA1 Message Date
Mitchell Hashimoto
0b9130aba9 apprt/gtk-ng: initial size apprt action (window-width/height) 2025-07-31 13:28:30 -07:00
Leah Amelia Chen
cf9943a3dd gtk(wayland): bind globals correctly (#8110) 2025-07-31 18:28:05 +02:00
Leah Amelia Chen
c2165fc097 gtk(wayland): bind globals correctly
Fixes #7988
2025-07-31 15:51:49 +08:00
Mitchell Hashimoto
6c952d4168 apprt/gtk-ng: desktop notification 2025-07-30 09:31:54 -07:00
Mitchell Hashimoto
e7ea084cc3 apprt/gtk-ng: present surface 2025-07-30 09:20:15 -07:00
Mitchell Hashimoto
60b859dbf2 apprt/gtk-ng: open config, open url 2025-07-30 09:04:01 -07:00
Mitchell Hashimoto
7b1092f991 apprt/gtk-ng: surface has correct initial size
Ensure the surface has a correct initial size when created. This avoids
a rapid resize event and also the pty reports the correct size for
startup scripts.

This is a departure from macOS and legacy GTK. This has been an issue in
Ghostty for awhile so this is the proper path forward.

This works by deferring Surface initialization until the first resize
event. This MIGHT result in a frame or two not rendering but I haven't
noticed anything visually and having the correct size is far more
important.
2025-07-30 08:48:27 -07:00
Mitchell Hashimoto
fde50e0f1c apprt/gtk-ng: create-window action 2025-07-29 15:07:04 -07:00
Mitchell Hashimoto
0cc8b6d10f apprt/gtk-ng: remove all shortcuts on tab view 2025-07-29 14:57:50 -07:00
Mitchell Hashimoto
2847aeb181 apprt/gtk-ng: toggle tab overview 2025-07-29 14:56:16 -07:00
Mitchell Hashimoto
a5188142ba apprt/gtk-ng: move tab 2025-07-29 14:52:33 -07:00
Mitchell Hashimoto
2d1232878d apprt/gtk-ng: goto_tab 2025-07-29 14:40:45 -07:00
Mitchell Hashimoto
4fb790ca4c apprt/gtk-ng: helper for getAncestor 2025-07-29 10:58:31 -07:00
Mitchell Hashimoto
8b14ab1221 apprt/gtk-ng: workaround for tab overview selection 2025-07-29 10:39:45 -07:00
Mitchell Hashimoto
0da6b2049d apprt/gtk-ng: tab overview new tab 2025-07-29 10:29:28 -07:00
Mitchell Hashimoto
ccc8dac0a5 apprt/gtk-ng: new tab button 2025-07-29 10:24:25 -07:00
Mitchell Hashimoto
b475cd28d5 apprt/gtk-ng: new tab, slightly broken 2025-07-29 10:17:26 -07:00
Mitchell Hashimoto
0682811107 apprt/gtk-ng: window close confirmation 2025-07-29 09:48:17 -07:00
Mitchell Hashimoto
70010ec50a typos 2025-07-29 09:38:31 -07:00
Mitchell Hashimoto
e4fb46f230 apprt/gtk-ng: close window if no tabs left 2025-07-29 09:38:09 -07:00
Mitchell Hashimoto
3bb6cdff4e apprt/gtk-ng: window getActiveSurface 2025-07-29 09:33:38 -07:00
Mitchell Hashimoto
3f440821d9 fix up suppressions 2025-07-29 09:29:50 -07:00
Mitchell Hashimoto
c0e7b92e91 apprt/gtk-ng: close tab confirmation 2025-07-29 09:27:13 -07:00
Mitchell Hashimoto
431a6328dc apprt/gtk-ng: handle surface close request 2025-07-28 21:38:00 -07:00
Mitchell Hashimoto
ed25a57d08 apprt/gtk-ng: hook up all existing surface signals 2025-07-28 21:22:23 -07:00
Mitchell Hashimoto
5279badd5b apprt/gtk-ng: bind a bunch on page-attach/detach 2025-07-28 21:08:47 -07:00
Mitchell Hashimoto
fa45f971f4 apprt/gtk-ng: title bindings 2025-07-28 12:38:40 -07:00
Mitchell Hashimoto
775f3dfca3 apprt/gtk-ng: basic tab creation 2025-07-28 10:52:33 -07:00
Mitchell Hashimoto
e768b54d89 apprt/gtk-ng: new tab button in header 2025-07-28 10:21:47 -07:00
Mitchell Hashimoto
bc6cbdc41a apprt/gtk-ng: toolbar style config 2025-07-28 10:21:47 -07:00
Mitchell Hashimoto
d7e42e6614 apprt/gtk-ng: tab bar top/bottom 2025-07-28 10:21:47 -07:00
Mitchell Hashimoto
e7cab27c38 apprt/gtk-ng: tab bar properties 2025-07-28 10:21:47 -07:00
Mitchell Hashimoto
288461fbee apprt/gtk-ng: setup tab views in blueprint 2025-07-28 10:21:47 -07:00
Mitchell Hashimoto
a5a09f5ba4 apprt/gtk-ng: port SIGUSR2 to reload config (#8091)
Nothing controversial here.
2025-07-28 08:33:22 -07:00
Mitchell Hashimoto
c149ba1907 apprt/gtk-ng: port SIGUSR2 to reload config 2025-07-28 08:21:28 -07:00
Jeffrey C. Ollie
96573917a0 gtk-ng: fix up background of resize and url overlays
PR #8088 had the unexpected side-effect of making the resize and url
overlays transparent as well. This PR fixes that.
2025-07-27 23:28:28 -05:00
Jeffrey C. Ollie
92c004cb25 gtk-ng: add/remove 'background' css class from window depending on opacity 2025-07-27 22:05:16 -05:00
Mitchell Hashimoto
bf61f29f57 apprt/gtk-ng: create the privateObjFieldAccessor helper to unref 2025-07-27 15:11:07 -07:00
Mitchell Hashimoto
c4de001023 apprt/gtk-ng: avoid reading corrupt memory in event loop 2025-07-27 14:28:21 -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
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
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
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