mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
@ -183,6 +183,16 @@ class PrimaryWindowManager {
|
|||||||
// If we remove a window, we reset the cascade point to the key window so that
|
// If we remove a window, we reset the cascade point to the key window so that
|
||||||
// the next window cascade's from that one.
|
// the next window cascade's from that one.
|
||||||
if let focusedWindow = NSApplication.shared.keyWindow {
|
if let focusedWindow = NSApplication.shared.keyWindow {
|
||||||
|
// If we are NOT the focused window, then we are a tabbed window. If we
|
||||||
|
// are closing a tabbed window, we want to set the cascade point to be
|
||||||
|
// the next cascade point from this window.
|
||||||
|
if focusedWindow != window {
|
||||||
|
Self.lastCascadePoint = focusedWindow.cascadeTopLeft(from: NSZeroPoint)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we are the focused window, then we set the last cascade point to
|
||||||
|
// our own frame so that it shows up in the same spot.
|
||||||
let frame = focusedWindow.frame
|
let frame = focusedWindow.frame
|
||||||
Self.lastCascadePoint = NSPoint(x: frame.minX, y: frame.maxY)
|
Self.lastCascadePoint = NSPoint(x: frame.minX, y: frame.maxY)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user