Merge pull request #1246 from getagentseal/fix/dock-popover-fullscreen-space

fix(mac): the Capacity Dock popover appears inside a full-screen space
This commit is contained in:
Resham Joshi 2026-09-03 06:14:36 -07:00 • committed by GitHub
commit 522b17b3e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -559,6 +559,10 @@ final class CapacityDockController {
model.detailHeight = glanceDetailHeight(for: provider)
ensureDetailPanel()
layoutDetail(for: provider, transaction: wasShowingDetail ? .detailFollow : .detailPresent)
// A panel that lost its all-spaces membership returns to the desktop space alone,
// so hovering inside a full-screen app presented the popover where it could not be
// seen. The rail escapes this by never being ordered out.
detailPanel?.reassertSpaceMembership()
detailPanel?.orderFrontRegardless()
}
@ -1384,11 +1388,21 @@ private final class CapacityDockPanel: NSPanel {
hidesOnDeactivate = false
isReleasedWhenClosed = false
isMovable = false
isFloatingPanel = true
isExcludedFromWindowsMenu = true
becomesKeyOnlyIfNeeded = true
animationBehavior = .none
collectionBehavior = [.canJoinAllSpaces, .stationary, .fullScreenAuxiliary, .ignoresCycle]
collectionBehavior = Self.spaceBehavior
}
/// Membership of every space, including the one a full-screen app owns. The window
/// server drops it from a panel across a display sleep or a display reconfiguration,
/// and writing it again is what re-registers the window, so this is re-asserted
/// before each presentation rather than only at init.
static let spaceBehavior: NSWindow.CollectionBehavior =
[.canJoinAllSpaces, .stationary, .fullScreenAuxiliary, .ignoresCycle]
func reassertSpaceMembership() {
collectionBehavior = Self.spaceBehavior
}
override var canBecomeKey: Bool { false }