Commit Graph

13654 Commits

Author SHA1 Message Date
Mitchell Hashimoto
dbeeb952cc macos: fix dragging point 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
e56dce3d84 macos: don't create drop zone at all if self dragging 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
e1f22472f6 macos: convert the transferable to a nsdraggingitem 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
7b743164ef macos: fix iOS builds 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
be97b5bede macOS: convert Surface dragging to use NSDraggingSource 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
9b7124cf62 macos: use preference key to detect self dragging 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
5245757875 macos: all sorts of cleanups 2025-12-29 06:55:01 -08:00
Mitchell Hashimoto
1dd8e3ef4a macos: add GhosttyDelegate for global operations 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
9724541a33 macos: unify split callbacks into a single tagged enum 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
60bc5a9ae7 macos: clean up some SwiftUI nesting 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
5916755388 macos: drop splits across windows 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
8f8b5846c6 macos: hook up onDrop to move splits 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
d92fe44d0d macos: fix various iOS build errors 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
485b861342 macos: drag preview is an image of the surface 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
5d8c9357c0 macos: move around some functions 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
0a80f77766 macos: wire up onDrop 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
43d87cf9f8 macos: setup drop UI on our split views 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
ddfd4fe7c2 macos: export our ghostty surface ID type 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
304e2612ab macOS: work on drop destination 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
5045688623 macos: move grab handle to separate file 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
57bb636655 surfaceview as transferable 2025-12-29 06:55:00 -08:00
Mitchell Hashimoto
88adffd734 macOS: add handle to the top of surfaces that can be used to drag
UI only
2025-12-29 06:54:59 -08:00
Mitchell Hashimoto
ab232b3060 macos: move Ghostty surface view into dedicated folder 2025-12-29 06:54:59 -08:00
Mitchell Hashimoto
551031e41f macOS: move NSGlassEffectView into TerminalViewContainer (#10062)
- Fixes #9991
> Modifying the subview of NSThemeFrame seems "dangerous" and
unpredictable.
- Provides correct `intrinsicContentSize` as previous
`NSHostingView<TerminalView>` did
  > Fixes regression caused by #10046

> [!NOTE]
> AI Proofread some of my comments
2025-12-29 06:52:18 -08:00
Mitchell Hashimoto
76ad1f4563 Only use macOS 26.0 workarounds on macOS 26.0 (#10083)
Following up on my comment here about ripping out the NSScrollPocket
frame change observer in SurfaceScrollView once it's no longer needed:
https://github.com/ghostty-org/ghostty/pull/9446#issuecomment-3505314976

I tested the full macOS {26.0, 26.1, 26.2} times Xcode {26.0, 26.1,
26.2} matrix, and the fix was actually on the macOS side, i.e., the
workaround is always needed on macOS 26.0 and never on macOS 26.1+,
regardless of Xcode version. So if we want to avoid this kludge when
it's not needed, we have to use `#available` predicates rather than
removing the code outright.

I'll let maintainers judge whether the juice is worth the squeeze.

I also looked into the other 26.0-only workaround, pertaining to the
window title in the tabs titlebar, but I found that even though the
behavior with an empty view is OK on 26.1+, a warning about ambiguous
content size is still logged, so I figured this should be left as-is. I
updated the comment accordingly.
2025-12-29 06:51:30 -08:00
Mitchell Hashimoto
e5ef246e9a deps: update z2d to v0.10.0 (#10085)
Release notes at:
 https://github.com/vancluever/z2d/blob/v0.10.0/CHANGELOG.md

Mainly a maintenance update with regards to Ghostty use, with a couple
of minor changes required to some type references to match new API
semantics.

However, the new release does bring hairline stroking, if that's of any
interest 🙂
2025-12-29 06:50:30 -08:00
Chris Marchesi
6d36193378 deps: update z2d to v0.10.0
Release notes at:
 https://github.com/vancluever/z2d/blob/v0.10.0/CHANGELOG.md

Mainly a maintenance update with regards to Ghostty use, with a couple
of minor changes required to some type references to match new API
semantics.
2025-12-28 12:30:36 -08:00
Daniel Wennberg
b7a12effce Only use macOS 26.0 workarounds on macOS 26.0 2025-12-28 09:47:22 -08:00
Mitchell Hashimoto
52d8e1f44c build: fix pkgs for FBSD port runs (#10081)
Looks like this is the final piece (local builds are working). The FBSD
port is now building with no issues.
2025-12-28 06:07:00 -08:00
-k
e63a4ab774 build: fix pkgs for FBSD port runs 2025-12-28 07:21:58 -05:00
Mitchell Hashimoto
38664afde0 Update iTerm2 colorschemes (#10079)
Upstream release:
https://github.com/mbadolato/iTerm2-Color-Schemes/releases/tag/release-20251222-150520-0add1e1
2025-12-27 17:06:15 -08:00
mitchellh
03ecc9fdbf deps: Update iTerm2 color schemes 2025-12-28 00:16:19 +00:00
Mitchell Hashimoto
c00d7fc5c4 shell-integration: ensure clean env on failure (#10035)
Our shell integration routines can now fail when resources are missing.
This change introduces tests to ensure that they leave behind a clean
environment upon failure.

The bash integration needed a little reordering to support this.
2025-12-26 13:29:27 -08:00
Mitchell Hashimoto
9eceea18ec macOS: Don't duplicate command palette entries for terminal commands (#10069)
This is a regression introduced when we added macOS support for custom
entries. I mistakingly thought that only custom entries were in the
config, but we do initialize it with all!
2025-12-26 11:13:21 -08:00
Mitchell Hashimoto
14f592b8d4 macOS: Don't duplicate command palette entries for terminal commands
This is a regression introduced when we added macOS support for custom
entries. I mistakingly thought that only custom entries were in the
config, but we do initialize it with all!
2025-12-26 11:03:50 -08:00
Mitchell Hashimoto
78e895dfae terminal: Fix possible crash on RenderState with invalid mouse point (#10067)
Fixes #10032
2025-12-26 10:48:24 -08:00
Mitchell Hashimoto
26b104c9e0 terminal: Fix possible crash on RenderState with invalid mouse point
Fixes #10032
2025-12-26 10:45:15 -08:00
Mitchell Hashimoto
ebcc350018 datastruct/circ_buf: fix n=0 edge cases (#10066)
From #10063

This fixes and tests various edge cases around noop operations.
2025-12-26 10:36:36 -08:00
Mitchell Hashimoto
23addb3c67 terminal: fix crash when sliding window sees empty node (#10065)
Related to #10063

This fixes a crash that can happen if the SlidingWindow search portion
sees a zero-byte page.

We have more fixes to implement in the circular buffer handling but
putting the fix at this layer also prevents some unnecessary allocations
for zero-byte data.
2025-12-26 10:36:15 -08:00
Mitchell Hashimoto
eb5d2e034b datastruct/circ_buf: fix n=0 edge cases
From #10063

This fixes and tests various edge cases around noop operations.
2025-12-26 10:33:52 -08:00
Mitchell Hashimoto
79cc22e186 terminal: fix crash when sliding window sees empty node
Related to #10063

This fixes a crash that can happen if the SlidingWindow search portion
sees a zero-byte page. 

We have more fixes to implement in the circular buffer handling but
putting the fix at this layer also prevents some unnecessary allocations
for zero-byte data.
2025-12-26 10:26:12 -08:00
Mitchell Hashimoto
90075045c7 fix(iOS): fix iOS app startup failure (#10060)
Fixes #7643

This commit address the issue with 3 minor fixes:
1. Initialize ghostty lib before app start, or global allocator will be
null.
2. `addSublayer` should be called on CALayer object, which is the
property 'layer' of UIView
3. According to apple's
[document](https://developer.apple.com/documentation/metal/mtlstoragemode/managed?language=objc),
managed storage mode is not supported by iOS. So always use shared mode.

FYI, another [fix](https://github.com/mitchellh/libxev/pull/204) in
libxev is also required to make iOS app work.
2025-12-26 07:17:47 -08:00
Lukas
6ab884d69f macOS: fix intrinsicContentSize of TerminalViewContainer 2025-12-26 13:35:25 +01:00
Zongyuan Li
88e471e015 fix(iOS): fix iOS app startup failure
Fixes #7643

This commit address the issue with 3 minor fixes:
1. Initialize ghostty lib before app start, or global allocator will
   be null.
2. `addSublayer` should be called on CALayer object, which is the
   property 'layer' of UIView
3. According to apple's [document](https://developer.apple.com/documentation/metal/mtlstoragemode/managed?language=objc),
   managed storage mode is not supported by iOS. So always use shared
   mode.

FYI, another [fix](https://github.com/mitchellh/libxev/pull/204) in libxev
is also required to make iOS app work.
2025-12-26 18:53:45 +08:00
Lukas
1c90af3569 macOS: move NSGlassEffectView into TerminalViewContainer 2025-12-26 11:44:30 +01:00
Mitchell Hashimoto
f705b9f46a terminal: search will re-scroll to navigate to a single match (#10056)
Fixes #9958
Replaces #9989

This changes the search navigation logic to always scroll if there is a
selected search result so long as the search result isn't already within
the viewport.
2025-12-25 13:54:13 -08:00
Mitchell Hashimoto
2415116ad0 Revert "macOS: move NSGlassEffectView into TerminalViewContainer (#10046)"
This reverts commit b8490f40c5, reversing
changes made to 050278feae.
2025-12-25 13:52:59 -08:00
Mitchell Hashimoto
f54ac11080 terminal: search will re-scroll to navigate to a single match
Fixes #9958
Replaces #9989

This changes the search navigation logic to always scroll if there is a
selected search result so long as the search result isn't already within
the viewport.
2025-12-25 13:50:02 -08:00
Mitchell Hashimoto
b8490f40c5 macOS: move NSGlassEffectView into TerminalViewContainer (#10046)
Fixes #9991, modifying the subview of `NSThemeFrame` seems "dangerous"
and unpredictable.

> [!NOTE]
> AI Proofread some of my comments



https://github.com/user-attachments/assets/c443cf71-8a00-4c37-b008-d89b7f1564a3
2025-12-25 12:51:47 -08:00
Mitchell Hashimoto
050278feae chore: fixed some typo (#10054)
Author: rezky_nightky <with dot rezky at gmail dot com>
Repository: ghostty
Branch: main
Signing: GPG (4B65AAC2)
HashAlgo: BLAKE3

[ Block Metadata ]
BlockHash:
c37f4ee817412728a8058ba6087f5ca6aaff5a845560447d595d8055972d0eac
PrevHash:
3510917a780936278debe21786b7bae3a2162cb3857957314c3b8702e921b3d4
PatchHash:
5e5bb4ab35df304ea13c3d297c6d9a965156052c82bccf852b1f00b7bcaa7dd4

FilesChanged: 18
Lines: +92 / -92

Timestamp: 2025-12-25T17:27:08Z
Signature1:
c1970dbb94600d1e24dfe8efcc00f001664db7b777902df9632a689b1d9d1498
Signature2:
30babb1e3ca07264931e067bfe36c676fb7988c2e06f8c54e0c9538fe7c7fc9a
2025-12-25 12:50:31 -08:00