mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
BugFix: Hide Notch from Screen Recordings
This commit is contained in:
parent
c555aa40a6
commit
18f68f56ea
18 changed files with 105 additions and 211 deletions
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
import Defaults
|
||||
|
||||
class ClipboardPanel: NSPanel {
|
||||
|
||||
|
|
@ -51,10 +50,8 @@ class ClipboardPanel: NSPanel {
|
|||
.stationary,
|
||||
.fullScreenAuxiliary // Float above full-screen apps
|
||||
]
|
||||
|
||||
// Apply screenshot protection
|
||||
updateScreenshotProtection()
|
||||
setupScreenshotProtectionObserver()
|
||||
|
||||
ScreenCaptureVisibilityManager.shared.register(self, scope: .panelsOnly)
|
||||
|
||||
// Accept mouse moved events for proper hover behavior
|
||||
acceptsMouseMovedEvents = true
|
||||
|
|
@ -140,28 +137,6 @@ class ClipboardPanel: NSPanel {
|
|||
setFrameOrigin(NSPoint(x: xPosition, y: yPosition))
|
||||
}
|
||||
|
||||
private func setupScreenshotProtectionObserver() {
|
||||
// Observe changes to hidePanelsFromScreenCapture setting
|
||||
Defaults.observe(.hidePanelsFromScreenCapture) { [weak self] change in
|
||||
DispatchQueue.main.async {
|
||||
self?.updateScreenshotProtection()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func updateScreenshotProtection() {
|
||||
let shouldHide = Defaults[.hidePanelsFromScreenCapture]
|
||||
|
||||
if shouldHide {
|
||||
// Exclude from screenshots and screen recordings
|
||||
self.sharingType = .none
|
||||
print("🙈 ClipboardPanel: Protected from screenshots and screen recordings")
|
||||
} else {
|
||||
// Allow normal screenshot inclusion
|
||||
self.sharingType = .readOnly
|
||||
print("👁️ ClipboardPanel: Visible in screenshots and screen recordings")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ClipboardPanelView: View {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue