mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Show quick terminal on another full-screen app
This commit is contained in:

committed by
Mitchell Hashimoto

parent
34a0b206f8
commit
2206c509be
@ -1,6 +1,6 @@
|
|||||||
import Cocoa
|
import Cocoa
|
||||||
|
|
||||||
class QuickTerminalWindow: NSWindow {
|
class QuickTerminalWindow: NSPanel {
|
||||||
// Both of these must be true for windows without decorations to be able to
|
// Both of these must be true for windows without decorations to be able to
|
||||||
// still become key/main and receive events.
|
// still become key/main and receive events.
|
||||||
override var canBecomeKey: Bool { return true }
|
override var canBecomeKey: Bool { return true }
|
||||||
@ -26,6 +26,9 @@ class QuickTerminalWindow: NSWindow {
|
|||||||
// window remains resizable.
|
// window remains resizable.
|
||||||
self.styleMask.remove(.titled)
|
self.styleMask.remove(.titled)
|
||||||
|
|
||||||
|
// We don't want to activate the owning app when quick terminal is triggered.
|
||||||
|
self.styleMask.insert(.nonactivatingPanel)
|
||||||
|
|
||||||
// We need to set our window level to a high value. In testing, only
|
// We need to set our window level to a high value. In testing, only
|
||||||
// popUpMenu and above do what we want. This gets it above the menu bar
|
// popUpMenu and above do what we want. This gets it above the menu bar
|
||||||
// and lets us render off screen.
|
// and lets us render off screen.
|
||||||
@ -41,7 +44,7 @@ class QuickTerminalWindow: NSWindow {
|
|||||||
// We don't want to be part of command-tilde
|
// We don't want to be part of command-tilde
|
||||||
.ignoresCycle,
|
.ignoresCycle,
|
||||||
|
|
||||||
// We never support fullscreen
|
// We want to show the window on another space if it is visible
|
||||||
.fullScreenNone]
|
.fullScreenAuxiliary]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user