mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Fix terminal notch lifecycle so open/close, hover, outside-click, focus, and opacity stay consistent.
fix: stabilize terminal notch open/close, focus, and opacity Improve terminal tab behavior in notch by preventing hover re-open races, keeping outside-click close logic accurate, and reliably restoring terminal opacity/translucency after remounts. Also ensure terminal receives focus on open and resigns cleanly on close so keyboard input and close/open cycles behave consistently.
This commit is contained in:
parent
9c9f68399e
commit
f39785f920
5 changed files with 128 additions and 14 deletions
|
|
@ -157,9 +157,14 @@ struct NotchTerminalView: View {
|
|||
// notch close/open cycles; updateNSView handles restart.
|
||||
TerminalNSViewRepresentable(terminalManager: terminalManager)
|
||||
.clipShape(terminalClipShape)
|
||||
.padding(.horizontal, notchTerminalContentEdgePadding.horizontal)
|
||||
.padding(.bottom, notchTerminalContentEdgePadding.bottom)
|
||||
.padding(.top, notchTerminalContentEdgePadding.top)
|
||||
.padding(
|
||||
EdgeInsets(
|
||||
top: notchTerminalContentEdgePadding.top,
|
||||
leading: notchTerminalContentEdgePadding.horizontal,
|
||||
bottom: notchTerminalContentEdgePadding.bottom,
|
||||
trailing: notchTerminalContentEdgePadding.horizontal
|
||||
)
|
||||
)
|
||||
.onHover { hovering in
|
||||
updateSuppression(for: hovering)
|
||||
}
|
||||
|
|
@ -184,6 +189,10 @@ struct NotchTerminalView: View {
|
|||
.onDisappear {
|
||||
updateSuppression(for: false)
|
||||
}
|
||||
.onAppear {
|
||||
terminalManager.refreshTerminalAppearanceIfNeeded()
|
||||
terminalManager.focusTerminalIfPossible()
|
||||
}
|
||||
}
|
||||
|
||||
private func updateSuppression(for hovering: Bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue