Fixes#734
I don't know much about SwiftUI, but here's why I think this works.
- Moving the `inspectorVisible` logic to an `onChange` ensures the view
has at least seen that change.
- The dispatch to the main thread is still necessary to ensure the view
hierarchy has completely updated after `inspectorVisible`.
Note that this fix is to correctly regain focus. We still lose window
focus very briefly.
Some CoreFoundation objects, such as those produced by CoreText, have
expensive callbacks that run when they are released. By offloading the
CFRelease calls to another thread, we can avoid important threads being
blocked by unexpectedly expensive callbacks.
This commit also changes the way that the coretext shaper's run iterator
builds its string. Rather than using a CFMutableString, an ArrayList of
unichars is built which is passed to CFStringCreateWithCharactersNoCopy,
which is a lot more efficient since it avoids all the CoreFoundation
overhead.
This is the result of running `nix flake update zls`.
For some reason updating zig itself doesn't help. There are two mentions
of zig-overlay in the lock file so I imagine that has something to do
with that. As in - the version used by zls was the one with the problem.
Fixes this isssue:
```
$ nix develop --extra-experimental-features flakes --extra-experimental-features nix-command
error: builder for '/nix/store/yhhlna9rbdfcrzyxnl9gpaf2wac2swr7-zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz.drv' failed with exit code 1;
last 7 log lines:
>
> trying https://ziglang.org/builds/zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 303 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
> curl: (22) The requested URL returned error: 403
> error: cannot download zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz from any mirror
For full logs, run 'nix-store -l /nix/store/yhhlna9rbdfcrzyxnl9gpaf2wac2swr7-zig-macos-x86_64-0.12.0-dev.3480+9dac8db2d.tar.xz.drv'.
error: 1 dependencies of derivation '/nix/store/wg3w03dlw05rha5cfc7nvllffhzihwnc-zig-0.12.0-dev.3480+9dac8db2d.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x6dhn56cw9ndr496vh50gqafnqf8vyqa-zls.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hrwa46pabh3jvbx71c3194plf9pjifqz-ghostty-env.drv' failed to build
```
Thanks to: https://thejh.net/misc/website-terminal-copy-paste
If a paste has the ending sentinel value for a bracketed paste
("\x1b[201~") then the shell may start processing data faster. We now
consider this unsafe even if the `clipboard-paste-bracketed-safe`
setting is true.
Use clone3 / CLONE_INTO_CGROUP to have the Linux kernel create the process in the
correct cgroup rather than move the process into the cgroup after it is created.
Fixes#1722
Previously, SharedGrid.getIndex would properly lock any access to search
for and load the face metadata for a font face that contains a
codepoint. However, that face may be "deferred" (metadata loaded but the
actual face not loaded).
Later, outside of the SharedGrid write lock, a deferred face may be
initialized and cause a data race if two threads are doing this at the
same time, sometimes loading to a crash.
This commit fixes the issue by always preloading font indexes in
getIndex because the usage of getIndex implies a very near term future
use of getFace.
Fixes#1833
This is an attempt to simplify the logic that has organically grown
convoluted over time with regards to how the titlebar and tab bar is
styled.
This field is one unified field that ONLY addresses titlebar and tab bar
styling. It can be one of "native", "transparent", or "tabs". The
"native" field is the new behavior in this commit: it makes the titlebar
and tab bar appearance be absolutely native. We do not color anything
(if we do its a bug).
The "transparent" option is the previous `macos-titlebar-tabs = false`
setting where the titlebar/tab bar is native but colored according to
the window background color.
The "tabs" option is `macos-titlebar-tabs = true`.
The `window-theme = auto` affect on titlebar appearance has been
removed. Now, the titlebar will NEVER be styled with "native" and MAY be
styled with "transparent" and will ALWAYS be styled with "tabs" (since
that's a totally custom look anyways).
The alias handling block only handles one alias, which is already
handled in the switch statement. Remove this block and rename all
references to 'action' back to 'input'.
Fixes#1724
See background in #1724. The general idea is that for Ghostty
invocations via xdg-terminal-exec, we set the initial title to the
command automatically so that window managers can modify the styling.
We only do this for xdg-terminal-exec because that protocol/spec is
specifically for the scenario that the terminal is being used to launch
a command from the desktop environment.