8086 Commits

Author SHA1 Message Date
Mitchell Hashimoto
873ebc368c Merge pull request #2772 from jparise/todo-sixel
doc: remove sixel support from the TODO list
2024-11-22 21:49:56 -08:00
Mitchell Hashimoto
8deefca7f3 Merge pull request #2777 from ghostty-org/push-zulksrrwpxyx
config: clone must preserve conditional state
2024-11-22 20:05:23 -08:00
Mitchell Hashimoto
1e16f30309 config: clone must preserve conditional state
This fixes an issue where once the app config is updated, it'd revert
back to the default state.
2024-11-22 20:02:35 -08:00
Mitchell Hashimoto
b04f31f5c6 config: clone() should run the replay steps
This preserves replay steps for future use. Previously, clone copied
values but failed to copy the replay steps.
2024-11-22 15:10:44 -08:00
Mitchell Hashimoto
f1043d5fad Merge pull request #2774 from ghostty-org/push-qtvoskmxulyu
App applies conditional state, supports theme setting
2024-11-22 14:21:57 -08:00
Mitchell Hashimoto
cd49015243 App applies conditional state, supports theme setting
The prior light/dark mode awareness work works on surface-level APIs. As
a result, configurations used at the app-level (such as split divider
colors, inactive split opacity, etc.) are not aware of the current theme
configurations and default to the "light" theme.

This commit adds APIs to specify app-level color scheme changes. This
changes the configuration for the app and sets the default conditional
state to use that new theme. This latter point makes it so that future
surfaces use the correct theme on load rather than requiring some apprt
event loop ticks. Some users have already reported a short "flicker" to
load the correct theme, so this should help alleviate that.
2024-11-22 14:08:35 -08:00
Jon Parise
41d64d886a doc: remove sixels from the TODO list
Per https://github.com/ghostty-org/ghostty/discussions/2496
2024-11-22 16:41:24 -05:00
Mitchell Hashimoto
958316d851 Merge pull request #2770 from ghostty-org/push-xptpwxwxvwxs
macos: update recommended Xcode settings
2024-11-22 12:37:19 -08:00
Mitchell Hashimoto
a46cda18f1 Merge pull request #2769 from ghostty-org/reload-config
Use apprt action system to trigger config reload
2024-11-22 12:05:00 -08:00
Mitchell Hashimoto
523307e958 macos: update recommended Xcode settings
I genuinely don't know what they do, but Xcode recommended it and
cursory docs reading seems to indicate its safe. I don't think it'll
result in any noticeable changes.
2024-11-22 12:00:38 -08:00
Mitchell Hashimoto
0bb4ca269c macos: use Ghostty logger not AppDelegate 2024-11-22 11:53:52 -08:00
Mitchell Hashimoto
f20b20bd6a apprt/gtk: fix build 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
00c62708d3 apprt: remove change conditional state action 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
266e4781fb apprt/gtk: update for new reload config API 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
0a794addf1 apprt/glfw: update to new reload config action 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
a191f3c396 apprt: switch to reload_config action that calls update_config API 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
6371af0d8e config: need to apply window-theme for light/dark after loading theme 2024-11-22 11:52:34 -08:00
Mitchell Hashimoto
ddde68d1f4 macos: add NSAppearance.isDark 2024-11-22 10:31:31 -08:00
Mitchell Hashimoto
7bae9e1d20 Merge pull request #2768 from ghostty-org/push-pzzwlvwumwpq
config: fix invalid memory access on theme loading
2024-11-22 09:48:08 -08:00
Mitchell Hashimoto
048d4c80dc Merge pull request #2765 from trag1c/doc-proxy-icon
docs: include valid values for `macos-titlebar-proxy-icon`
2024-11-22 09:46:01 -08:00
Mitchell Hashimoto
e53eb9bd6f config: fix invalid memory access on theme loading
Fixes GHOSTTY-1X in Sentry

The comment explains.
2024-11-22 09:45:32 -08:00
Mitchell Hashimoto
49581ae8fc Merge pull request #2766 from vprigent/fix-url-regex
Add two edge cases to the url regex
2024-11-22 09:17:39 -08:00
Vincent Prigent
96bda270a2 Add two edge cases to the url regex 2024-11-22 22:57:45 +13:00
trag1c
03f06431a7 docs: include valid values for macos-titlebar-proxy-icon 2024-11-22 01:07:56 +01:00
Mitchell Hashimoto
a733ea381b macos: OSColor.hexString must be able to compile with UIKit 2024-11-21 14:50:03 -08:00
Mitchell Hashimoto
e17741aebd Merge pull request #2762 from ghostty-org/config-update
apprt config change notification, macOS transparent titlebar works with theme change
2024-11-21 14:28:14 -08:00
Mitchell Hashimoto
1aa77837eb macos: use correct title background if top surface 2024-11-21 14:20:31 -08:00
Mitchell Hashimoto
36a57826a6 macos: only color the titlebar of surfaces that border the top 2024-11-21 14:07:39 -08:00
Mitchell Hashimoto
7fb86a3c9c macos: listen for color change property to update window appearance 2024-11-21 13:37:54 -08:00
Mitchell Hashimoto
f722e30bf5 macos: terminal controller reacts to surface config changes 2024-11-21 12:46:46 -08:00
Mitchell Hashimoto
35fcb1a29b macos: change config access to evented, derived config like libghostty
Previously, we would access the `ghostty.config` object from anywhere.
The issue with this is that memory lifetime access to the underlying
`ghostty_config_t` was messy. It was easy when the apprt owned every
reference but since automatic theme changes were implemented, this isn't
always true anymore.

To fix this, we move to the same pattern we use internally in the core
of ghostty: whenever the config changes, we handle an event, derive our
desired values out of the config (copy them), and then let the caller
free the config if they want to. This way, we can be sure that any
information we need from the config is always owned by us.
2024-11-21 11:36:51 -08:00
Mitchell Hashimoto
037d4364e5 config: C API ghostty_config_clone 2024-11-21 10:41:48 -08:00
Mitchell Hashimoto
3afb9065f0 macos: listen for config change and post a notification 2024-11-21 10:30:27 -08:00
Mitchell Hashimoto
fadfb08efe apprt: add config_change action 2024-11-21 10:30:27 -08:00
Mitchell Hashimoto
3404816875 Merge pull request #2761 from ghostty-org/push-zspzyylxlsvr
input: Binding set clone must deep clone actions
2024-11-21 10:11:27 -08:00
Mitchell Hashimoto
e187a412fa input: Binding set clone must deep clone actions
Fixes a crash found in Discord.

Cloning the keybinding set previously shallow copied the actions, but
actions may contain pointers. These pointer values must be deep copied
to avoid dangling references when the underlying memory is freed.
2024-11-21 10:07:44 -08:00
Mitchell Hashimoto
63bf16ff00 Merge pull request #2748 from ghostty-org/push-zzqzxrsnqrtn
cli: parseCLI for optionals should not be null in release modes
2024-11-20 19:18:31 -08:00
Mitchell Hashimoto
4ef2240618 cli: parseCLI for optionals should not be null in release modes
Fixes #2747

I admit I don't fully understand this. But somehow, doing `var x: ?T =
undefined` in release fast mode makes `x` act as if its unset. I am
guessing since undefined does nothing to the memory, the memory layout
is such that it looks null for zeroed stack memory. This is a guess.

To fix this, I now initialize the type `T` and set it onto the optional
later. This commit also fixes an issue where calling `parseCLI` multiple
times on an optional would not modify the previous value if set.
2024-11-20 19:05:52 -08:00
Mitchell Hashimoto
d3b2f33061 ci: set xcode 16 on zig builds or macOS 2024-11-20 15:02:22 -08:00
Mitchell Hashimoto
3392659e1f Revert "macos: enable Metal shader logging"
This reverts commit aad101565abff3368af76e8c2e93cbe7c278a89f.
2024-11-20 15:01:27 -08:00
Mitchell Hashimoto
b65a0a4646 Merge pull request #2746 from ghostty-org/push-lyqwxytykwyx
apprt/gtk: set inherited working directory manually
2024-11-20 14:53:07 -08:00
Mitchell Hashimoto
7aeee06471 apprt/gtk: set inherited working directory manually
Fixes #2745

GTK uses a delayed surface initialization since we initialize on
GTKGLArea realize not on the actual callback. Because of that, our
inherited directory doesn't always work since that depends on a
previously focused widget.

This copies our desired inherited directory to an allocation so that we
can set it during realize.
2024-11-20 14:49:01 -08:00
Mitchell Hashimoto
1798fc67bf ci: release job should set xcode version earlier 2024-11-20 14:14:53 -08:00
Mitchell Hashimoto
53dba182bf Merge pull request #2735 from ghostty-org/theme
Configuration to specify separate light/dark mode theme
2024-11-20 14:12:36 -08:00
Mitchell Hashimoto
f8a8b0464c renderer/opengl: fix memory leak when copying font features 2024-11-20 14:08:00 -08:00
Mitchell Hashimoto
5f49ffad6a Merge pull request #2736 from ghostty-org/push-sltwuokrztpt
macos: enable Metal shader logging
2024-11-20 06:37:29 -08:00
Mitchell Hashimoto
cc776fd78b Merge pull request #2739 from AnthonyZhOon/main
Change oniguruma link target from `oniguruma` to `onig`
2024-11-20 06:36:13 -08:00
Anthony
daa0fe00b1 Change oniguruma link target from oniguruma to onig 2024-11-20 18:34:21 +11:00
Mitchell Hashimoto
aad101565a macos: enable Metal shader logging
This enables the compile options and Xcode configuration so that logging
in Metal shaders shows up in our Xcode debug console. This doesn't add
any log messages, but makes it so that when we iterate on the shaders in
the future, we can add and see logs to help us out.
2024-11-19 18:59:41 -08:00
Mitchell Hashimoto
03b60ab2ef apprt/gtk: support light/dark mode change on the fly 2024-11-19 16:12:11 -08:00