Commit Graph

1235 Commits

Author SHA1 Message Date
Mitchell Hashimoto
207eccffda macos: Sparkle notFound acknowledgement should only be called on dismiss (#9126)
This was causing the "no update found" message to never really appear in
the real world.
2025-10-10 09:30:12 -07:00
Xiangbao Meng
2bf9c777d7 Fix macos-titlebar-tabs related issues (#9090)
### This pr fixes multiple issues related to `macos-titlebar-tabs`

- [Window title clipping **on
Tahoe**](https://github.com/ghostty-org/ghostty/discussions/9027#discussion-8981483)
- Clipped tab bar **on Tahoe** when creating new ones in fullscreen
> Sequoia doesn't seem to have this issue (at least I didn't reproduce
myself)
- [Title missing **on Tahoe** after dragging a tab into a separate
window](https://github.com/ghostty-org/ghostty/discussions/9027#discussioncomment-14617088)
- [Clipped tab bar **on Tahoe** after dragging from one tab group to
another](https://github.com/ghostty-org/ghostty/discussions/9027#discussioncomment-14626078)
- [Stretched tab bar after switching system
appearance](https://github.com/ghostty-org/ghostty/discussions/9027#discussioncomment-14626918)


### Related issues
I checked all of the open sub-issues in #2349 , most of them should be
fixed in latest main branch (I didn't reproduce)

- [#1692](https://github.com/ghostty-org/ghostty/issues/1692)
@peteschaffner
- [#1945](https://github.com/ghostty-org/ghostty/issues/1945) this one I
reproduce only on Tahoe, and fixed in this pr, @injust
- [#1813](https://github.com/ghostty-org/ghostty/issues/1813) @jacakira
- [#1787](https://github.com/ghostty-org/ghostty/issues/1787)
@roguesherlock
- [#1691](https://github.com/ghostty-org/ghostty/issues/1691) ~**haven't
found a solution yet**(building zig on VM is a pain**)~
> Tried commenting out `isOpaque` check in
`TitlebarTabsVenturaTerminalWindow`, which would fix the issue, but I
see the note there about transparency issue.
  >
> After commenting it out, it worked fine for me with blur and opacity
config, so **I might need some more background on this**. Didn't include
this change yet.
  > 
> [See screenshot
here](https://github.com/user-attachments/assets/eb17642d-b0de-46b2-b42a-19fb38a2c7f0)



### Minor improvements

- Match window title style with `window-title-font-family` and focus
state
  
<img width="843" height="198" alt="image"
src="https://github.com/user-attachments/assets/0138c4fa-1a4b-4bab-a415-b32695899ccf"
/>

---------

Co-authored-by: Mitchell Hashimoto <m@mitchellh.com>
2025-10-10 09:21:29 -07:00
Mitchell Hashimoto
e0ee10e902 macos: re-enable real update check 2025-10-10 08:44:25 -07:00
Mitchell Hashimoto
9dac88248f macos: ax for update info 2025-10-10 08:38:50 -07:00
Mitchell Hashimoto
6993947a3a macOS: Make a lot of things more robust 2025-10-10 08:27:30 -07:00
Mitchell Hashimoto
ba8eae027e macos: fixed width for downloading/extracting, better padding 2025-10-10 07:19:25 -07:00
Mitchell Hashimoto
f124bb4975 macos: Fallback to standard driver when no unobtrusive targets exist 2025-10-09 17:38:24 -07:00
Mitchell Hashimoto
f2e5b8fb2d macos: setup the standard sparkle driver for no-window scenario
If there are no windows, we use the standard sparkle driver to drive
the standard window-based update UI.
2025-10-09 08:57:48 -07:00
Mitchell Hashimoto
bbf875216f macos: fix driver for retry to trigger update check again 2025-10-09 08:51:33 -07:00
Mitchell Hashimoto
a2fbaec613 macos: do not build updaters into iOS 2025-10-08 22:18:36 -07:00
Mitchell Hashimoto
49eb65df77 macos: show release notes link 2025-10-08 22:05:03 -07:00
Mitchell Hashimoto
abab6899f9 macos: better update descriptions 2025-10-08 21:45:48 -07:00
Mitchell Hashimoto
bce49a0843 macos: hook up our new update controller 2025-10-08 21:41:18 -07:00
Mitchell Hashimoto
b4ab1cc1ed macos: clean up the permission request 2025-10-08 21:21:27 -07:00
Mitchell Hashimoto
9e17255ca9 macos: "OK" should dismiss error 2025-10-08 21:16:07 -07:00
Mitchell Hashimoto
95a9e63401 macos: not found state dismisses on click, after 5s 2025-10-08 21:13:34 -07:00
Mitchell Hashimoto
a55de09944 macos: update simulator to test various scenarios in UI 2025-10-08 21:09:06 -07:00
Mitchell Hashimoto
59829f5359 Sparkle user driver, drives updates to the view model. 2025-10-08 21:03:04 -07:00
Mitchell Hashimoto
f975ac8019 macOS: only show the update overlay if window doesn't support it 2025-10-08 15:39:56 -07:00
Mitchell Hashimoto
81e3ff90a3 macOS: Show update information as an overlay 2025-10-08 13:29:39 -07:00
Mitchell Hashimoto
fc347a6040 macOS: Move update view model over to App scope 2025-10-08 12:50:09 -07:00
Mitchell Hashimoto
09ba5a27a2 macOS: Unobtrusive update views 2025-10-08 12:50:09 -07:00
Daniel Wennberg
0b14026696 Expand ~ in macos-custom-icon 2025-10-04 00:13:23 -07:00
Mitchell Hashimoto
77114d7927 macos: avoid any zero-sized content size increments
Fixes #9016
2025-10-03 13:35:40 -07:00
Andreas Deininger
a667b740ee Fix typos 2025-10-03 18:52:26 +02:00
Mitchell Hashimoto
0cc3728803 macOS: Focus Terminal App Intent (#8961)
Closes #8791 
Discussion: #8657 

### Summary
This adds the FocusTerminalIntent App Intent and related function
(focusSurface), allows external tools (such as Shortcuts/Siri) to
programmatically move focus to a specific terminal window or tab.

### Verification
This functionality has been tested across following scenarios,
confirming correct focus behavior for:

- Split Window
- Tab Group
- Quick Terminal

### Note
It is not supported to move focus to a split that is hidden by a zoomed
split. The same applies to the CloseTerminalIntent.

### AI Disclosure
This pull request was made with assistance from Claude Code.
I reviewed all AI-generated code and wrote the final output manually.
2025-09-30 06:55:49 -07:00
himura467
373be61482 docs 2025-09-30 06:36:29 +09:00
himura467
b3d0b6a965 refactor: no need to set from for moveFocus probably 2025-09-30 05:58:21 +09:00
himura467
bc3d0b7cbc fix: the renderer's cursor remains in an unfocused state (block_hollow) 2025-09-30 05:21:56 +09:00
himura467
a6dd7bbeee refactor: improve asynchronous delay by delegating window/app activation process to animateIn 2025-09-29 02:02:42 +09:00
himura467
7ab0a7814b docs(BaseTerminalController) 2025-09-29 01:56:00 +09:00
himura467
337ecdd0b3 refactor(focusSurface): check app status in advance 2025-09-29 00:02:43 +09:00
himura467
8151f4bbf5 feat: focusSurface for quick terminal 2025-09-29 00:00:41 +09:00
himura467
9d33545a55 feat: focus terminal in basic cases 2025-09-28 19:20:00 +09:00
Lars
8beeebc21d Force Ghostty to be active if not 2025-09-22 15:27:27 +02:00
Lars
8600954526 Workaround for #8669 2025-09-22 14:52:10 +02:00
Mitchell Hashimoto
4d761c96e5 macos: quick terminal stores the last closed size by screen
Fixes #8713

This stores the last closed state of the quick terminal by screen
pointer. We use a weak mapping so if a screen is unplugged we'll clear
the memory. We will not remember the size if you unplug and replug in a
monitor.
2025-09-19 13:01:29 -07:00
Mitchell Hashimoto
f60bdb0faa macos: set the app icon in syncAppearance to delay the icon update
Fixes #8734

This forces the app icon to be set on another event loop tick from
the main startup. 

In the future, we should load and set the icon completely in another
thread. It appears that all the logic we have is totally thread-safe.
2025-09-19 12:07:28 -07:00
Mitchell Hashimoto
d27bc69f2e macos: correct SurfaceView supported send/receive types for services
Fixes #8785

This is the callback AppKit sends when it wants to know if our
application can handle sending and receiving certain types of data.

The prior implementaiton was incorrect and would erroneously claim
support over combinations that we couldn't handle (at least, at the
SurfaceView layer). 

This corrects the implementation. The services we expect still show up
and the error in 8785 goes away.
2025-09-19 11:44:46 -07:00
Mitchell Hashimoto
6143aa8ce0 macos: "new tab" service should set preferred parent to ensure tab
Fixes #8783

Our new tab flow will never have a previously focused window because its
triggered by a service so we need to use the "preferred parent" logic we
have to open this in the last focused window.
2025-09-19 09:58:27 -07:00
Mitchell Hashimoto
fe55d90ec5 macos: implement bell-features=border on macOS 2025-09-18 14:43:09 -07:00
Mitchell Hashimoto
ad92bf7ab5 macos: bell-features=title works again
This was a regression we didn't fix before 1.2.
2025-09-18 14:02:32 -07:00
Mitchell Hashimoto
4fa8b8f285 macos: opening filepaths should make proper file URLs
Fixes #8763
2025-09-18 13:28:27 -07:00
Mitchell Hashimoto
734d1a13b3 macos: set initial window in TerminalWindow awakeFromNib
Maybe fixes #8736

I thought `windowDidLoad` was early on because its before the window is
shown but apparently not. Let's try `awakeFromNib` which is called
just after the window is loaded from the nib. It is hard to get any
earlier than that.
2025-09-18 13:05:57 -07:00
Mitchell Hashimoto
773990ada3 macos: window-position-x/y are from top-left corner
Fixes #8672

Almost fully written by AI: https://ampcode.com/threads/T-86df68a3-578c-4a1c-91f3-788f8b8f0aae

I reviewed all the code.
2025-09-18 12:18:13 -07:00
Mitchell Hashimoto
058d6808c1 macos: custom progress bar to workaround macOS 26 ProgressView bugs
Fixes #8731

The progress view in macOS 26 is broken in ways we can't work around
directly. Instead, we must create our own custom progress bar. Luckily,
our usage of the progress view is very simple.

Amp threads:
https://ampcode.com/threads/T-88b550b7-5e0d-4ab9-97d9-36fb63d18f21
https://ampcode.com/threads/T-721d6085-21d5-497d-b6ac-9f203aae0b94
2025-09-18 10:22:54 -07:00
Caleb Hearth
ac9f3b88aa Pass config to splits in NewTerminalConfig
Config contains the command, working directory, and environment
variables intended to be passed to the new split, but it looks like we
forgot to include it as an argument in this branch.

Discussion: https://github.com/ghostty-org/ghostty/discussions/8637
2025-09-15 13:16:18 -06:00
Mitchell Hashimoto
431364cf16 macos: disable NSAutoFillHeuristicController on macOS 26
Fixes #8616

macOS 26 (as of RC1) has some pathological performance bug where the
terminal becomes unusably slow after some period of time. We aren't 100%
sure what triggers the slowdown, but it is app-wide (new tabs or windows
don't resolve it) and Instruments traces point directly to
NSAutoFillHeuristicController. Specifically, to the `debounceTextUpdate`
selector.

This is all not documented as far as I can find and also not open
source, so I have no idea what's going on.

The best I can tell is that the NSAutoFillHeuristicController has
something to do with enabling heuristic-based autofill such as SMS auth
codes in text input fields. I don't know what is causing it to go
haywire.

SMS autofill is not desirable in a terminal app, nor is any of the other
automatic autofill in macOS I know of (contact info, passwords, etc.).
So, we can just disable it.

This default isn't documented but I found it via a strings dump of the
AppKit binary blob and comparing it to the disassembly to see how it is
used. In my limited testing, this seems to work around the problem.
2025-09-14 13:05:01 -07:00
Mitchell Hashimoto
d813d82da1 macOS 26: Always set titlebarview background color for transparent title
This fixes an issue where new tabs would not have the proper transparent
background set whilst in native fullscreen. This is because in native
fullscreen, the NSTitlebarView always is visible, so our guard was
preventing us from setting it before.
2025-09-12 20:41:02 -07:00
Mitchell Hashimoto
eaaf5aa8cf macos: always reset titlebar tab constraints on frame change
Fixes #8595

Whenever the titlebar frame changes, we should set up our constraints
again to force it to re-render properly.
2025-09-12 20:14:31 -07:00