mirror-ghostty/macos/Sources/Helpers/Extensions
Mitchell Hashimoto ea505ec51d
macos: use stable display UUID for quick terminal screen tracking
NSScreen instances can be garbage collected at any time, even for
screens that remain connected, making NSMapTable with weak keys
unreliable for tracking per-screen state.

This changes the quick terminal to use CGDisplay UUIDs as stable
identifiers, keyed in a strong dictionary. Each entry stores the
window frame along with screen dimensions, scale factor, and last-seen
timestamp.

Rules for pruning:
- Entries are invalidated when screens shrink or change scale
- Entries persist and update when screens grow (allowing cached state
  to work with larger resolutions)
- Stale entries for disconnected screens expire after 14 days.
- Maximum of 10 screen entries to prevent unbounded growth
2025-10-17 21:04:23 -07:00
..
Array+Extension.swift macos: address some feedback 2025-06-21 06:42:32 -07:00
Double+Extension.swift macos: transparent titlebar handles transparent background 2025-06-11 15:18:02 -07:00
Duration+Extension.swift wip: undo 2025-06-07 12:46:13 -07:00
EventModifiers+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
FileHandle+Extension.swift macos: support configuration via CLI arguments 2025-07-05 21:31:23 -07:00
KeyboardShortcut+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
NSAppearance+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
NSApplication+Extension.swift macos: compile errors in CI 2025-06-07 12:46:15 -07:00
NSImage+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
NSMenuItem+Extension.swift macos: menu item symbols for Tahoe 2025-06-14 19:44:24 -07:00
NSPasteboard+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
NSScreen+Extension.swift macos: use stable display UUID for quick terminal screen tracking 2025-10-17 21:04:23 -07:00
NSView+Extension.swift macos: GetTerminalDetails intent 2025-06-21 06:39:18 -07:00
NSWindow+Extension.swift macos: disambiguate close tab vs close window for confirmation 2025-06-17 16:16:14 -07:00
NSWorkspace+Extension.swift macos: open URLs with NSWorkspace APIs instead of `open` 2025-07-06 21:01:01 -07:00
OSColor+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
Optional+Extension.swift macos: support env vars for surface config, clean up surface config 2025-06-21 06:39:20 -07:00
String+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00
UUID+Extension.swift macos: use stable display UUID for quick terminal screen tracking 2025-10-17 21:04:23 -07:00
UndoManager+Extension.swift macos: make sure we're not registering unnecessary undos 2025-06-07 12:46:15 -07:00
View+Extension.swift macos: moving some files around 2025-06-05 07:05:13 -07:00