mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-04-21 08:58:37 +03:00

Two major changes: 1. Hiding uses `NSApp.hide` which hides all windows, preserves tabs, and yields focus to the next app. 2. Unhiding manually tracks and brings forward only the windows we hid. Proper focus should be retained.
10 lines
227 B
Swift
10 lines
227 B
Swift
/// A wrapper that holds a weak reference to an object. This lets us create native containers
|
|
/// of weak references.
|
|
class Weak<T: AnyObject> {
|
|
weak var value: T?
|
|
|
|
init(_ value: T) {
|
|
self.value = value
|
|
}
|
|
}
|