Commit Graph

555 Commits

Author SHA1 Message Date
Tim Culverhouse
d1468086ef macos: defer key-window focus sync to reduce churn
Amp-Thread-ID: https://ampcode.com/threads/T-019cb9fe-b11b-753f-99e7-8ecc52b73ec4
Co-authored-by: Amp <amp@ampcode.com>
2026-03-04 12:43:51 -06:00
Lukas
661470897e macos: passthrough right mouse down event to TabTitleEditor if needed 2026-03-03 17:24:56 +01:00
Lukas
205c05d59d macos: passthrough mouse down event to TabTitleEditor if needed 2026-03-03 17:15:12 +01:00
Lukas
e6e5f3ffe1 macos: finish editing tab title when the window resigns as key window 2026-03-03 16:34:11 +01:00
Abdurrahman
0d5b9d554c Update macos/Sources/Features/Terminal/TerminalController.swift
apply reviewer suggestion for cascading

Co-authored-by: Lukas <134181853+bo2themax@users.noreply.github.com>
2026-02-28 18:02:40 +01:00
A-AKB
6e622f8c75 fix(macos): extract window cascade logic into helper function 2026-02-28 01:43:00 +01:00
A-AKB
0db32ab9a8 macos: fix window size/position restoration on Cmd+W close
This fixes two overlapping issues regarding window positioning and Cmd+W window closures on macOS:

1. `window-position-x` and `window-position-y` coordinates were being ignored on initial launch because `TerminalWindow.setInitialWindowPosition` depended on the `TerminalController`, which isn't fully attached during `awakeFromNib`. This logic was moved so explicit coordinates are correctly enforced.
2. When closing a window via Cmd+W (leaving the app active), reopening the window would continuously cascade down and to the right rather than restoring to the previous position. It now checks if there are other windows open before cascading.
3. `LastWindowPosition` was updated to save both the frame origin and size (width/height), ensuring that restoring a closed window correctly mimics native AppKit State Restoration size behaviors while honoring explicit configurations.
2026-02-28 01:34:18 +01:00
Lukas
df53f75ad1 macOS: refine window tint for liquid glass (#11018)
Depends on #11030

- Update constraints of `TerminalGlassView`
- Use `TerminalViewContainer.DerivedConfig` to map styling properties
- Add TerminalViewContainerTests
- Instead of using delay, now the view updates are explicitly called by
window controllers
2026-02-27 10:49:12 -08:00
Mitchell Hashimoto
3aca722415 macos: further simplication of AppDelegate bell state 2026-02-26 09:52:26 -08:00
Mitchell Hashimoto
79ca4daea6 macos: try to clean up Appdelegate combine mess 2026-02-26 09:47:17 -08:00
Mitchell Hashimoto
ea8bf17df8 macos: use combine to coalesce bell values 2026-02-26 09:39:23 -08:00
Mitchell Hashimoto
e6da439e43 macos: style changes 2026-02-26 07:09:08 -08:00
Lukas
05a125533b macos: fix glass tinting when theme changes 2026-02-26 11:24:54 +01:00
Mitchell Hashimoto
1c3f7601a7 macos: pass last focused surface as env, use for focus detection
Fixes #10935

This is a more robust way to detect "is my surface focused" because that
question usually means "is my surface the last focused surface" if a
_different_ surface is not focused. We already have used this pattern
all over but we should extend it to SwiftUI too.
2026-02-25 14:01:12 -08:00
Noah Gregory
58acab6c7d Merge branch 'ghostty-org:main' into fix-tabbing-from-tab-overview 2026-02-24 20:24:18 -05:00
Noah Gregory
dd4e36f921 macOS: fix crash when adding tab from tab overview 2026-02-24 18:08:45 -05:00
Mitchell Hashimoto
6a9a21afb6 macOS: Add inactive window tint overlay for liquid glass (#10943)
**Summary:**
- Add tint overlay to dim terminal windows when inactive, fixes
https://github.com/ghostty-org/ghostty/discussions/10040
- Refactor the liquid glass effect into a dedicated `TerminalGlassView`
class

Note: The tint overlay color and opacity values may not be ideal —
feedback is welcome.

**AI Disclosure:** I used Claude Code to read the macos repo and
understand the liquid glass implementation. Implemented basic tint
overlay mainly by hand. Refactor the code and review changes with Claude
Code.
2026-02-23 09:01:25 -08:00
Mitchell Hashimoto
f5e2561eb7 macos: rename to TabTitleEditor 2026-02-23 08:38:10 -08:00
Mitchell Hashimoto
b6a9d54e98 macos: extract inline title editing to standalone file 2026-02-23 08:38:09 -08:00
MiUPa
879d7cf337 macOS: remove dead tab title edit helper 2026-02-23 08:38:09 -08:00
MiUPa
368e190a41 macOS: defer inline tab rename start to reduce flicker 2026-02-23 08:38:09 -08:00
MiUPa
f6e9b19fd5 macOS: widen inline tab title editor 2026-02-23 08:38:09 -08:00
MiUPa
feee4443da macOS: add inline tab title editing 2026-02-23 08:38:09 -08:00
MiUPa
daa2a9d0d5 macos: allow renaming tab title on double-click 2026-02-23 08:38:09 -08:00
miracles
81c9c81ae3 Refactor glass effect into TerminalGlassView and add inactive window tint overlay 2026-02-22 21:58:33 -08:00
Jon Parise
2d6fa92d78 macos: swiftlint 'for_where' rule 2026-02-20 19:42:48 -05:00
Jon Parise
e887527e59 macos: swiftlint 'unused_enumerated' rule 2026-02-20 08:03:05 -05:00
Jon Parise
dbf2e0e087 macos: swiftlint 'vertical_parameter_alignment' rule 2026-02-19 19:11:36 -05:00
Jon Parise
f4d70df34c macos: swiftlint 'implicit_getter' rule 2026-02-19 19:02:49 -05:00
Jon Parise
629a656e53 macos: swiftlint 'vertical_whitespace' rule 2026-02-19 18:58:28 -05:00
Jon Parise
a36d2f5420 macos: swiftlint 'unused_closure_parameter' rule 2026-02-19 18:57:43 -05:00
Jon Parise
b532cd55d6 macos: swiftlint 'trailing_whitespace' rule 2026-02-19 18:56:43 -05:00
Jon Parise
33dce8511e macos: swiftlint 'trailing_semicolon' rule 2026-02-19 18:56:25 -05:00
Jon Parise
25b38b291e macos: swiftlint 'private_over_fileprivate' rule 2026-02-19 18:55:12 -05:00
Jon Parise
6052f664cf macos: swiftlint 'opening_brace' rule 2026-02-19 18:53:13 -05:00
Jon Parise
32e540c248 macos: swiftlint 'legacy_constant' rule 2026-02-19 18:38:32 -05:00
Jon Parise
9287a61920 macos: swiftlint 'implicit_optional_initialization' rule 2026-02-19 18:36:38 -05:00
Jon Parise
56d67ce88f macos: swiftlint 'control_statement' rule 2026-02-19 18:34:37 -05:00
Jon Parise
a8903c1bb1 macos: swiftlint 'comment_spacing' rule 2026-02-19 18:34:02 -05:00
Jon Parise
6ade5df799 macos: swiftlint 'comma' rule 2026-02-19 18:33:34 -05:00
Jon Parise
786bad9774 macos: swiftlint 'colon' rule 2026-02-19 18:32:44 -05:00
benodiwal
3d0da44e15 feat(config): allow fullscreen config to specify non-native mode directly
Co-Authored-By: Sachin <sachinbeniwal0101@gmail.com>
2026-02-19 14:34:22 -08:00
Mitchell Hashimoto
6ace63acc4 macOS: xib changes from xcode
Literally just opening these on Xcode 26.2 does this, so we should
commit it lol.
2026-01-27 08:10:00 -08:00
Mitchell Hashimoto
5a7fdf735e macos: custom tab title shows bell if active
Fixes #10210
2026-01-07 13:32:58 -08:00
Mitchell Hashimoto
323d362bc1 macos: dragging last window out of quick terminal works 2026-01-07 09:33:37 -08:00
Lukas
a265462aa6 macOS: moving a focused split to another tab should also update the previous tab 2026-01-07 09:18:41 -08:00
Lukas
02fc0f502f macOS: rename function to avoid mutating misunderstanding 2026-01-07 09:18:17 -08:00
Mitchell Hashimoto
7d0157e69a macOS: add Cmd+J "Jump to Selection" menu item and default binding
This matches other built-in macOS apps like Terminal, Notes, Safari. We
already had the binding, just needed to create the menu.

https://ampcode.com/threads/T-019b956a-f4e6-71b4-87fa-4162258d33ff
2026-01-06 14:30:11 -08:00
Aaron Ruan
9b6a3be993 macOS: Selection for Find feature
Adds the `selection_for_search` action, with Cmd+E keybind by default.
This action inputs the currently selected text into the search
field without changing focus, matching standard macOS behavior.
2026-01-06 22:21:55 +08:00
Mitchell Hashimoto
d4ba0fa27e macos: last surface should close tab immediately not window 2025-12-30 15:07:28 -08:00