BugFix: Hide Notch from Screen Recordings

This commit is contained in:
Hariharan Mudaliar 2025-11-26 15:48:07 +05:30
commit 18f68f56ea
18 changed files with 105 additions and 211 deletions

View file

@ -58,9 +58,7 @@ class ModelSelectionPanel: NSPanel {
.fullScreenAuxiliary
]
// Apply screen capture hiding setting
updateScreenCaptureVisibility()
setupScreenCaptureObserver()
ScreenCaptureVisibilityManager.shared.register(self, scope: .panelsOnly)
acceptsMouseMovedEvents = true
}
@ -89,27 +87,8 @@ class ModelSelectionPanel: NSPanel {
setFrameOrigin(NSPoint(x: xPosition, y: yPosition))
}
private func setupScreenCaptureObserver() {
// Observe changes to hidePanelsFromScreenCapture setting
Defaults.observe(.hidePanelsFromScreenCapture) { [weak self] change in
DispatchQueue.main.async {
self?.updateScreenCaptureVisibility()
}
}
}
private func updateScreenCaptureVisibility() {
let shouldHide = Defaults[.hidePanelsFromScreenCapture]
if shouldHide {
// Hide from screen capture and recording
self.sharingType = .none
print("🙈 ModelSelectionPanel: Hidden from screen capture and recordings")
} else {
// Allow normal screen capture
self.sharingType = .readOnly
print("👁️ ModelSelectionPanel: Visible in screen capture and recordings")
}
deinit {
ScreenCaptureVisibilityManager.shared.unregister(self)
}
}