285 Commits

Author SHA1 Message Date
Mitchell Hashimoto
a95a1a8838 macos: add button to ignore configuration errors
The popup will return on the next launch or configuration load.
2023-09-12 22:25:24 -07:00
Mitchell Hashimoto
999d17c49d macos: integrate needsConfirmQuit to quit if all windows are at prompt 2023-09-11 15:44:28 -07:00
Mitchell Hashimoto
2f0905b60c macos: reload config MUST go through Zig core 2023-09-11 15:20:31 -07:00
Mitchell Hashimoto
42bbcbfb9b macos: add a reload configuration button 2023-09-11 15:13:02 -07:00
Mitchell Hashimoto
ffd181f10d macos: don't steal focus for config errors 2023-09-11 13:59:03 -07:00
Mitchell Hashimoto
6f7fdf002f macos: hook up proper data events 2023-09-11 13:52:47 -07:00
Mitchell Hashimoto
711e3a5043 macos: add reload configuration to the Ghostty menu bar 2023-09-11 13:49:20 -07:00
Mitchell Hashimoto
4c0871b6dc macos: don't clear contentview for configuration on close 2023-09-11 13:39:29 -07:00
Mitchell Hashimoto
f485672d4e macos: fix some error window styling 2023-09-11 13:28:48 -07:00
Mitchell Hashimoto
db799d53e6 macos: UI for configuration errors 2023-09-11 13:21:13 -07:00
Mitchell Hashimoto
f0ee2fb454 macos: log configuration errors 2023-09-11 09:39:58 -07:00
Mitchell Hashimoto
2b04a7114b macos: use the configured unfocused split opacity 2023-09-10 18:52:40 -07:00
Mitchell Hashimoto
8bec01f237 macos: disable hit testing for unfocused split rectangle 2023-09-10 16:02:09 -07:00
Mitchell Hashimoto
ef5c5d1c0b macos: add split zoom to menu 2023-09-10 09:30:42 -07:00
Mitchell Hashimoto
de564dad94 macos: fade unfocused splits
Fixes #353
2023-09-10 09:17:46 -07:00
Mitchell Hashimoto
5f30223e84 macos: new window assertion is unnecessary
We handle both cases
2023-09-10 09:03:53 -07:00
Mitchell Hashimoto
303c5ca189 macos: split traversal uses direction to determine proper focus target
Fixes #415
2023-09-10 08:59:05 -07:00
Mitchell Hashimoto
f31bde48fc macos: add prev/next tab custom binding support 2023-09-09 13:00:23 -07:00
Mitchell Hashimoto
e5cba11ad0 macos: key events for modifier-only keys 2023-09-09 09:22:15 -07:00
Mitchell Hashimoto
8619351df7 macos: dock menu 2023-09-08 11:37:56 -07:00
Mitchell Hashimoto
1d8ee005c6 macos: handle reopen event and open a window if none are visible
Fixes #410
2023-09-07 14:47:50 -07:00
Will Pragnell
7d9598fe6e macos: fix split focus when toggling fullscreen 2023-09-03 22:55:22 -07:00
Mitchell Hashimoto
e657a0f671 macos: close and refocus split work while zoomed 2023-09-02 16:47:48 -07:00
Mitchell Hashimoto
76ae039701 macos: new split on zoomed split unzooms 2023-09-02 16:37:22 -07:00
Mitchell Hashimoto
e2282f1f4d macos: zoomed splits put an emoji in the title bar 2023-09-02 16:33:33 -07:00
Mitchell Hashimoto
4570356e57 turn zoom into a toggle rather than an explicit zoom/unzoom 2023-09-02 16:03:51 -07:00
Mitchell Hashimoto
70bdc21d22 macos: support zoomed splits 2023-09-02 15:51:10 -07:00
Mitchell Hashimoto
1626c8cd3a macos: hacks for split focus to work correctly on macos 12 2023-09-02 09:15:50 -07:00
Will Pragnell
f6e2b50732 macos: fix non-native-fullscreen menu & dock visibility bugs 2023-09-01 21:45:45 -07:00
Will Pragnell
86122624e0 macos: add visible-menu non-native-fullscreen option 2023-09-01 21:45:45 -07:00
Mitchell Hashimoto
e0015a0d00 macos: hacks to grab surface focus on macOS 12
See comment in code.
2023-09-01 16:23:30 -07:00
Karol Bakunowski
d7072cd29e macos: default to sRGB color space 2023-09-01 15:05:16 -07:00
Mitchell Hashimoto
d945640401 macos: break reference cycle to window to allow window to free memory
Fixes #366

The comment in the Swift code explains what was happening here:

> I don't know if this is the right place, but because of WindowAccessor in our
> SwiftUI hierarchy, we have a reference cycle between view and window and windows
> are never freed. When the window is closed, the window controller is deinitialized,
> so we can use this opportunity detach the view from the window and break the cycle.

An alternate solution would be to make our reference back to the window
"weak" but we appear to not be able to do that with SwiftUI property
wrappers such as `@State` and `@Binding` and so on.
2023-09-01 09:12:03 -07:00
Mitchell Hashimoto
b7508cdc66 macos: setup delegate for app state, config reload callback 2023-08-31 11:56:15 -07:00
Mitchell Hashimoto
10aaf8bd35 macos: sync all remaining menu items 2023-08-31 11:44:43 -07:00
Mitchell Hashimoto
76053460d5 macos: sync File menu 2023-08-31 11:40:21 -07:00
Mitchell Hashimoto
22b925223a macos: sync many more menu items 2023-08-31 11:33:58 -07:00
Mitchell Hashimoto
c7071a1da2 macos: complete lookup table for key equivalents 2023-08-31 11:14:07 -07:00
Mitchell Hashimoto
52396304ff macos: begin syncing menuitem key equivalents 2023-08-30 22:45:29 -07:00
Mitchell Hashimoto
c71979804e apprt/embedded: ghostty_surface_binding_action can now run any action 2023-08-30 21:46:38 -07:00
Will Pragnell
55d5350a65 macos: fix non-native fullscreen dock/menubar bugs 2023-08-26 19:35:19 -07:00
Thorsten Ball
be114e792f macOS: fix cascading windows when using tabs and closing windows
This fixes two things:

1. Issue #294: cascade point for new windows is set when creating new tabs
2. Cascade point was *not* reset when closing windows, which lead to a
   big "gap" appearing when, say, opening 5 windows, closing 4, opening
   a new window.
2023-08-19 20:21:20 +02:00
Thorsten Ball
a76aea4d0a macOS: new split can inherit font size 2023-08-19 09:59:04 +02:00
Thorsten Ball
2e9b787668 macOS: new window can inherit font size
This is the second part of #281 and adds the same mechanism that was
added for tabs in #296 for windows.

It works exactly the same way.
2023-08-19 09:29:56 +02:00
Mitchell Hashimoto
4f5460475c Merge pull request #296 from mitchellh/mrn/macos-inherit-font-size
macOS: inherit font size when creating new tab
2023-08-18 09:22:06 -07:00
Mitchell Hashimoto
a18503fc01 macos: can always set base config on new tab 2023-08-18 09:21:47 -07:00
Mitchell Hashimoto
79971c62a6 macos: pass around a base surface_config_s rather than a new tab 2023-08-18 09:09:43 -07:00
Thorsten Ball
cda87a6963 embedded: use separate struct to pass options to new_tab_cb 2023-08-18 06:50:47 +02:00
Thorsten Ball
12311e9707 macOS: simplify code for new tab 2023-08-18 06:26:15 +02:00
Thorsten Ball
3e7c4475a1 macOS: move newTab code to PrimaryWindowManager 2023-08-17 20:57:00 +02:00