9319 Commits

Author SHA1 Message Date
Mitchell Hashimoto
1d7f041f55 macos: update Sparkle to 2.6.4 to workaround security issue
https://github.com/ghostty-org/ghostty/security/dependabot/4
2025-02-05 10:45:10 -08:00
Mitchell Hashimoto
fbdee68667 Add a final newline to "No crash reports!" (#5583) 2025-02-05 10:35:28 -08:00
Mitchell Hashimoto
581b87b20c gtk: remove CSD styling when CSDs aren't used (#5581)
Fixes #2023
2025-02-05 10:33:48 -08:00
Kat
47e50abe24 Add a final newline to "No crash reports!" 2025-02-05 08:22:58 +00:00
Leah Amelia Chen
0c1f3d724d gtk: remove CSD styling when CSDs aren't used
Fixes #2023
2025-02-05 09:01:46 +01:00
Mitchell Hashimoto
f0d276062b Toggling visibility is now ignored when in fullscreen mode. (#5472)
This PR ensures visibility toggling is ignored when the currently
focused surface is fullscreen. This includes the following:

- Show/Hide All Terminals is ignored
- Using a binding to toggle is ignored

This ensures Ghostty doesn't unexpectedly lose focus or disappear and is
the expected behavior on macOS.
2025-02-03 13:57:48 -08:00
Mitchell Hashimoto
7b593b9d7c linux: ensure that group dir fd is closed (#5515)
The CLOEXEC flag on the fd will ensure that the directory is closed on
the child, but also need to close the fd in the parent.
2025-02-03 13:46:28 -08:00
Mitchell Hashimoto
0538d6db6a macOS: binding checks should never trigger preedit callbacks (#5559)
Fixes #5558

Binding checks would sometimes trigger preedit which would cause some
characters to leak through.

This is a bit of a band-aid. The real long term solution is noted in the
TODO comment in this commit, but I wanted to avoid regressions in a
patch release so I'm going to defer that to 1.2. This commit fixes the
main issue for 1.1.1.
2025-02-03 13:46:19 -08:00
Shaps Benkau
8d31f6ce2e Toggling visibility is now ignored when in fullscreen mode. 2025-02-03 13:44:23 -08:00
Mitchell Hashimoto
fc14c5b070 core: add explicit errors to src/os/env.zig (#5530) 2025-02-03 13:38:23 -08:00
Mitchell Hashimoto
fe6b46f4e7 core: add explicit errors to src/pty.zig (#5531) 2025-02-03 13:38:00 -08:00
Mitchell Hashimoto
c07b1ac2f0 gtk(x11): support server-side decorations (#5533)
Remind me to never touch Xlib code ever again.
2025-02-03 13:35:24 -08:00
Mitchell Hashimoto
730c6884f7 macOS: binding checks should never trigger preedit callbacks
Fixes #5558

Binding checks would sometimes trigger preedit which would cause some
characters to leak through.

This is a bit of a band-aid. The real long term solution is noted in the
TODO comment in this commit, but I wanted to avoid regressions in a
patch release so I'm going to defer that to 1.2. This commit fixes the
main issue for 1.1.1.
2025-02-03 13:32:47 -08:00
Jeffrey C. Ollie
b7fa8e5947 linux: ensure that group dir fd is closed
The CLOEXEC flag on the fd will ensure that the directory is closed on
the child, but also need to close the fd in the parent.
2025-02-03 15:10:06 -06:00
Jeffrey C. Ollie
3fdbd5f7ba core: fix up pty Zig error sets 2025-02-03 15:06:59 -06:00
Jeffrey C. Ollie
7f0d22a31e core: add explicit errors to src/pty.zig 2025-02-03 15:06:59 -06:00
Jeffrey C. Ollie
8607d463ff core: fix puralization of src/os/env.zig Errors->Error 2025-02-03 14:38:00 -06:00
Jeffrey C. Ollie
002cce4e81 core: handle src/os/env.zig errors on windows 2025-02-03 14:26:12 -06:00
Jeffrey C. Ollie
8660cdaad5 core: add explicit errors to src/os/env.zig 2025-02-03 14:26:12 -06:00
Leah Amelia Chen
d61ee46210 config: mention X11 support in window-decoration docs 2025-02-03 18:56:09 +01:00
Leah Amelia Chen
4cd49632b2 gtk(x11): support server-side decorations
Remind me to never touch Xlib code ever again.
2025-02-03 18:56:09 +01:00
Mitchell Hashimoto
cdd2099090 apprt/gtk: handle input methods that end preedit before commit (#5550)
Fixes #5494

When ibus/fcitx is not running (the GTK "simple" input method is
active), the preedit end event triggers _before_ the commit event. For
both ibus/fcitx, the opposite is true. We were relying on this ordering.

This commit changes the GTK input handling to not rely on this ordering.
Instead, we encode our composing state into the boolean state of whether
a key event is pressed. This happens before ANY input method events are
triggered.

Tested dead key handling on: X11/Wayland, ibus/fcitx/none.
2025-02-03 09:37:17 -08:00
Mitchell Hashimoto
f70ba14abd apprt/gtk: handle input methods that end preedit before commit
Fixes #5494

When ibus/fcitx is not running (the GTK "simple" input method is
active), the preedit end event triggers _before_ the commit event. For
both ibus/fcitx, the opposite is true. We were relying on this ordering.

This commit changes the GTK input handling to not rely on this ordering.
Instead, we encode our composing state into the boolean state of whether
a key event is pressed. This happens before ANY input method events are
triggered.

Tested dead key handling on: X11/Wayland, ibus/fcitx/none.
2025-02-03 09:24:29 -08:00
Mitchell Hashimoto
3b3e75c1dc gtk(wayland): respect window-decoration=none on GNOME (#5463)
This is, admittedly, a very silly bug. On GNOME the SSD protocol is not
available and past me just decided to always enable CSDs in that case,
*even when* `window-decoration = none`. I now question my own
intelligence.
2025-02-03 07:23:10 -08:00
Mitchell Hashimoto
61fd41116a linux: fix installation path of nautilus-python extension (#5469)
Fixes #5468
2025-02-03 07:19:01 -08:00
Mitchell Hashimoto
fe085001cb Update iTerm2 colorschemes (#5511)
Upstream revision:
db227d159a
2025-02-03 07:14:36 -08:00
Mitchell Hashimoto
1a1d3db207 Linux: Syscall errno handle (#5537)
When trying to run valgrind this incorrectly results in a correct
result, this is because `posix.errno` will use libc errno when linking
libc which ghostty does.


cf90dfd309/lib/std/posix.zig (L219-L221)

Since we are making the syscall directly we should not use this function
but rather use the return code directly on the enum, name from this
function seems odd to me (no zig experience) but it is the suggested
answer from zig (refer to issue below)
https://github.com/ziglang/zig/issues/22718

Note this definitely isnt much better than what we were doing before in
the case of running in valgrind

```text
error(linux-cgroup): unable to clone: os.linux.E__enum_81093.NOSYS
debug(io_thread): IO thread exited
warning(io_thread): error in io thread err=error.CloneError
warning(io_thread): abrupt io thread exit detected, starting xev to drain mailbox
debug(io_thread): io thread fully exiting after abnormal failure
```

opening a new tab shows
```
error starting IO thread: error.CloneError

The underlying shell or command was unable to be started.
This error is usually due to exhausting a system resource.
If this looks like a bug, please report it.

This terminal is non-functional. Please close it and try again.
```

this did not show on the original surface only on the new tab
2025-02-03 07:12:18 -08:00
Mitchell Hashimoto
79dd3776e2 Fix a typo in the docs for adjust-strikethrough-position and adjust-overline-position (#5543)
Presumably an error from copy-pasting documentation text.
2025-02-03 07:11:33 -08:00
Kat
1bd5ea6f73 Fix a typo in the docs for adjust-strikethrough-position and adjust-overline-position 2025-02-03 05:58:48 +00:00
rhodes-b
fb2516fbf6 comment on why to not use posix.errno 2025-02-02 16:35:20 -06:00
rhodes-b
bc156266c6 fix errno handle 2025-02-02 16:27:10 -06:00
mitchellh
5100f4ff7d deps: Update iTerm2 color schemes 2025-02-02 00:10:42 +00:00
Jeffrey C. Ollie
660d9dc671 linux: fix installation path of nautilus-python extension
Fixes #5468
2025-01-31 09:14:50 -06:00
Leah Amelia Chen
ac582ccf7c gtk(wayland): respect window-decoration=none on GNOME
This is, admittedly, a very silly bug. On GNOME the SSD protocol is not
available and past me just decided to always enable CSDs in that case,
*even when* `window-decoration = none`. I now question my own intelligence.
2025-01-31 12:17:05 +01:00
Mitchell Hashimoto
c5508e7d19 update version for development 2025-01-30 14:23:24 -08:00
Mitchell Hashimoto
dda242c96e ci: update publish job 2025-01-30 13:58:17 -08:00
Mitchell Hashimoto
facda0c3fb gtk(x11): update blur region upon syncAppearance (#5443)
Fixes a bug where the blur region offset used to accomodate CSDs are
applied even when CSDs are disabled.
v1.1.0
2025-01-30 13:43:48 -08:00
Mitchell Hashimoto
75dec598cc nix: fix Ghostty homepage in package (#5436) 2025-01-30 13:40:49 -08:00
Leah Amelia Chen
48a1a10330 gtk(x11): update blur region upon syncAppearance
Fixes a bug where the blur region offset used to accomodate CSDs
are applied even when CSDs are disabled.
2025-01-30 20:28:00 +01:00
Jeffrey C. Ollie
6dd9bf0038 nix: fix Ghostty homepage in package 2025-01-30 11:04:44 -06:00
Mitchell Hashimoto
adf4066b69 nix: use --system build flag instead of relying on $ZIG_GLOBAL_CACHE_DIR (#5434)
Fixes #5431
2025-01-30 08:48:31 -08:00
Jeffrey C. Ollie
40973417d0 nix: use --system build flag instead of relying on $ZIG_GLOBAL_CACHE_DIR
Fixes #5431
2025-01-30 10:16:45 -06:00
Mitchell Hashimoto
a62b26cd2f next version will be 1.1.0 2025-01-30 07:18:43 -08:00
Mitchell Hashimoto
04d36361b1 ci: separate publish and release workflows (#5425)
Fixes #4218 

This now requires a separate manually triggered `publish` workflow to be
run after the release completes in order to transition the release to
the `published` state.

Practically today this only means that the release will be published to
the macOS auto-updater, but in the future we could add additional steps
such as creating a GH release or some other notifications.

Importantly, this lets us verify the release in the uploaded location
before general users are notified of the update.
2025-01-29 17:21:52 -08:00
Mitchell Hashimoto
dbc4edc583 ci: separate publish and release workflows
This now requires a separate manually triggered `publish` workflow to be
run after the release completes in order to transition the release to
the `published` state.

Practically today this only means that the release will be published to
the macOS auto-updater, but in the future we could add additional steps
such as creating a GH release or some other notifications.

Importantly, this lets us verify the release in the uploaded location
before general users are notified of the update.
2025-01-29 16:39:35 -08:00
Mitchell Hashimoto
692168f8dd dist: remove cdata tags from appcast, we escape it all 2025-01-29 15:08:30 -08:00
Mitchell Hashimoto
fefda69ac3 input: performable bindings aren't part of the reverse mapping (#5421)
Fixes #4522

This is a bit of a hammer-meets-nail solution, but it's a simple
solution to the problem. The reverse mapping is used to find the binding
that an action is bound to, and it's used by apprt's to populate the
accelerator label in the UI.

The problem is that accelerators in GTK are handled early in the event
handling process and its difficult to get that event mapping to a
specific surface. Therefore, the "performable" prefix was not working.
On macOS, this issue didn't exist because there exists an OS mechanism
to install an event handler earlier than the menu system.

This commit changes the reverse mapping to only include bindings that
are not performable. This way, the keybind always reaches the surface
and can be handled by `Surface.keyCallback` which processes
`performable`.

The caveat is that performable bindings will not show up in the UI for
menu items. This is documented in this commit now. They still work, its
just a UI issue.
2025-01-29 14:44:52 -08:00
Mitchell Hashimoto
c33b82c634 macOS: add link to release notes on appcast (#5184)
Resolves #4730

I opted to link directly to the release notes of the updated version in
the `<description>` body, i.e. in the future it would link directly
v1.0.2's release notes at
https://ghostty.org/docs/install/release-notes/1-0-2. This thereby
implements the second option mentioned in the issue. It wasn't that much
harder than the third option, but if there's any particular reason _not
to_ link directly to a version's changelog page, I'll be more than happy
to modify this PR and implement the third option instead - in any case,
I had opened https://github.com/ghostty-org/website/pull/277 so that
https://ghostty.org/docs/install/release-notes is a valid page.

I also wrapped the current text `<![CDATA[ ... ]]>` just in case, as I
noticed this is a pretty standard practice in other apps that use
`<description>` to embed their release notes when using Sparkle -
[Sparkle's
documentation](https://sparkle-project.org/documentation/publishing/#embedded-release-notes)
says to do this so you can use unescaped HTML.
2025-01-29 14:38:18 -08:00
Mitchell Hashimoto
ce2a3773d2 input: performable bindings aren't part of the reverse mapping
Fixes #4522

This is a bit of a hammer-meets-nail solution, but it's a simple
solution to the problem. The reverse mapping is used to find the
binding that an action is bound to, and it's used by apprt's to populate
the accelerator label in the UI.

The problem is that accelerators in GTK are handled early in the event
handling process and its difficult to get that event mapping to a
specific surface. Therefore, the "performable" prefix was not working.
On macOS, this issue didn't exist because there exists an OS mechanism
to install an event handler earlier than the menu system.

This commit changes the reverse mapping to only include bindings that
are not performable. This way, the keybind always reaches the surface
and can be handled by `Surface.keyCallback` which processes
`performable`.

The caveat is that performable bindings will not show up in the UI
for menu items. This is documented in this commit now. They still work,
its just a UI issue.
2025-01-29 14:12:21 -08:00
Mitchell Hashimoto
09ccda4d28 apprt/gtk: set key modifier flag if physical modifier key is pressed (#5420)
Fixes #5191
2025-01-29 13:25:41 -08:00