Skip to content

Commit df2172c

Browse files
D3OXYclaude
andcommitted
Release v1.3.1 - Fix window visibility in screen share
- Fix: Cloak window now visible when shared in Google Meet/Zoom - Add: Toggle to enable/disable self-hiding from preview - Fix: Blur intensity updates live while sharing - Changed: Use SCContentFilter instead of sharingType for self-hiding 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 12dda99 commit df2172c

3 files changed

Lines changed: 82 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.1] - 2024-12-21
11+
12+
### Fixed
13+
- **Window visible in screen share**: Cloak window is now visible when shared in Google Meet/Zoom (previously was completely hidden)
14+
- **Self-hiding toggle**: Added option to hide/show Cloak window from its own preview (on by default)
15+
- **Live blur intensity**: Blur slider now updates in real-time while sharing
16+
17+
### Changed
18+
- Self-hiding now uses SCContentFilter exclusion instead of sharingType (only hides from own capture, not external apps)
19+
1020
## [1.3.0] - 2024-12-21
1121

1222
### Added
@@ -79,6 +89,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7989

8090
| Version | Date | Highlights |
8191
|---------|------|------------|
92+
| 1.3.1 | 2024-12-21 | Fix window sharing visibility, self-hide toggle |
8293
| 1.3.0 | 2024-12-21 | Live settings panel, conditional UI, modernized design |
8394
| 1.2.0 | 2024-12-21 | Real-time blur, blur intensity slider, liquid glass HUD |
8495
| 1.1.0 | 2024-12-21 | App exclusion, self-hiding window, documentation |

Cloak/AppDelegate.swift

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
9191
window.minSize = NSSize(width: 800, height: 500)
9292
window.isReleasedWhenClosed = false
9393
window.collectionBehavior = [.fullScreenPrimary]
94-
window.sharingType = .none // Hide from all screen capture
94+
// Note: Don't use sharingType = .none here - it would hide from Google Meet/Zoom too!
95+
// Instead, we exclude from our own capture via SCContentFilter
9596

9697
mainView = MainView(frame: windowRect)
9798
mainView.delegate = self
@@ -131,15 +132,19 @@ class AppDelegate: NSObject, NSApplicationDelegate {
131132
hudWindow = HUDWindow()
132133
}
133134

134-
// Collect all windows to exclude from capture
135-
var windowsToExclude: [NSWindow] = [window]
136-
if let hud = hudWindow {
137-
windowsToExclude.append(hud)
138-
}
139-
140135
// Get settings from start screen
141136
let excludedApps = mainView.startScreenView.getExcludedApps()
142137
let blurIntensity = mainView.startScreenView.getBlurIntensity()
138+
let hideSelfFromPreview = mainView.startScreenView.getHideSelfFromPreview()
139+
140+
// Collect windows to exclude from capture (only if self-hiding is enabled)
141+
var windowsToExclude: [NSWindow] = []
142+
if hideSelfFromPreview {
143+
windowsToExclude.append(window)
144+
if let hud = hudWindow {
145+
windowsToExclude.append(hud)
146+
}
147+
}
143148

144149
// Set blur intensity on preview view
145150
mainView.previewView.blurIntensity = blurIntensity
@@ -241,9 +246,10 @@ extension AppDelegate: MainViewSettingsDelegate {
241246
// Reload settings from UserDefaults
242247
engine.loadSettings()
243248

244-
// Update blur intensity on preview view
245-
let blurIntensity = mainView.startScreenView.getBlurIntensity()
246-
mainView.previewView.blurIntensity = blurIntensity
249+
// Update blur intensity from UserDefaults (may come from SettingsPanel or StartScreen)
250+
if UserDefaults.standard.object(forKey: "blurIntensity") != nil {
251+
mainView.previewView.blurIntensity = UserDefaults.standard.double(forKey: "blurIntensity")
252+
}
247253

248254
// Update custom image if changed
249255
if let imagePath = UserDefaults.standard.string(forKey: "customImagePath"),
@@ -728,6 +734,10 @@ class StartScreenView: NSView {
728734
private var excludedAppsStack: NSStackView!
729735
private var appNameField: NSTextField!
730736

737+
// Self-hiding toggle
738+
private var hideSelfFromPreview: Bool = true
739+
private var hideSelfToggle: NSButton!
740+
731741
// Scroll view
732742
private var scrollView: NSScrollView!
733743

@@ -768,6 +778,11 @@ class StartScreenView: NSView {
768778
excludedApps = apps
769779
}
770780

781+
// Load self-hiding preference (default true)
782+
if UserDefaults.standard.object(forKey: "hideSelfFromPreview") != nil {
783+
hideSelfFromPreview = UserDefaults.standard.bool(forKey: "hideSelfFromPreview")
784+
}
785+
771786
// Update visibility based on loaded mode
772787
updateModeSettingsVisibility()
773788
}
@@ -788,6 +803,10 @@ class StartScreenView: NSView {
788803
return customImage
789804
}
790805

806+
func getHideSelfFromPreview() -> Bool {
807+
return hideSelfFromPreview
808+
}
809+
791810
private func saveExcludedApps() {
792811
UserDefaults.standard.set(excludedApps, forKey: "excludedApps")
793812
refreshExcludedAppsList()
@@ -1021,13 +1040,36 @@ class StartScreenView: NSView {
10211040
excludeStack.translatesAutoresizingMaskIntoConstraints = false
10221041
excludeCard.addSubview(excludeStack)
10231042

1024-
let excludeHeader = createSectionHeader("Hide Apps from Capture")
1043+
let excludeHeader = createSectionHeader("Hide from Preview")
10251044
excludeStack.addArrangedSubview(excludeHeader)
10261045

1027-
let excludeHint = NSTextField(labelWithString: "These apps will be invisible in the shared view")
1028-
excludeHint.font = NSFont.systemFont(ofSize: 11)
1029-
excludeHint.textColor = .tertiaryLabelColor
1030-
excludeStack.addArrangedSubview(excludeHint)
1046+
// Self-hiding toggle row
1047+
let selfHideRow = NSView()
1048+
selfHideRow.translatesAutoresizingMaskIntoConstraints = false
1049+
1050+
hideSelfToggle = NSButton(checkboxWithTitle: "Hide Cloak window from its own preview", target: self, action: #selector(hideSelfToggleChanged))
1051+
hideSelfToggle.state = hideSelfFromPreview ? .on : .off
1052+
hideSelfToggle.font = NSFont.systemFont(ofSize: 12)
1053+
hideSelfToggle.translatesAutoresizingMaskIntoConstraints = false
1054+
selfHideRow.addSubview(hideSelfToggle)
1055+
1056+
NSLayoutConstraint.activate([
1057+
selfHideRow.heightAnchor.constraint(equalToConstant: 20),
1058+
hideSelfToggle.leadingAnchor.constraint(equalTo: selfHideRow.leadingAnchor),
1059+
hideSelfToggle.centerYAnchor.constraint(equalTo: selfHideRow.centerYAnchor)
1060+
])
1061+
excludeStack.addArrangedSubview(selfHideRow)
1062+
1063+
// Separator
1064+
let separator = NSBox()
1065+
separator.boxType = .separator
1066+
separator.translatesAutoresizingMaskIntoConstraints = false
1067+
excludeStack.addArrangedSubview(separator)
1068+
1069+
let excludeAppsLabel = NSTextField(labelWithString: "Hide other apps:")
1070+
excludeAppsLabel.font = NSFont.systemFont(ofSize: 12, weight: .medium)
1071+
excludeAppsLabel.textColor = .secondaryLabelColor
1072+
excludeStack.addArrangedSubview(excludeAppsLabel)
10311073

10321074
// Add app row
10331075
let addAppRow = NSView()
@@ -1244,6 +1286,12 @@ class StartScreenView: NSView {
12441286
updateHotkeyLabels()
12451287
}
12461288

1289+
@objc private func hideSelfToggleChanged() {
1290+
hideSelfFromPreview = hideSelfToggle.state == .on
1291+
UserDefaults.standard.set(hideSelfFromPreview, forKey: "hideSelfFromPreview")
1292+
onSettingsChanged?()
1293+
}
1294+
12471295
@objc private func addExcludedApp() {
12481296
let appName = appNameField.stringValue.trimmingCharacters(in: .whitespacesAndNewlines)
12491297
guard !appName.isEmpty else { return }
@@ -1306,6 +1354,8 @@ class StartScreenView: NSView {
13061354
// Update blur slider from loaded settings
13071355
blurSlider?.doubleValue = blurIntensity
13081356
blurValueLabel?.stringValue = "\(Int(blurIntensity))"
1357+
// Update self-hide toggle
1358+
hideSelfToggle?.state = hideSelfFromPreview ? .on : .off
13091359
}
13101360

13111361
@objc private func startClicked() {
@@ -1766,6 +1816,9 @@ class SettingsPanel: NSVisualEffectView {
17661816
private let imageWell = NSImageView()
17671817
private var customImage: NSImage?
17681818

1819+
// Self-hiding (display only, requires restart to take effect)
1820+
private var hideSelfFromPreview: Bool = true
1821+
17691822
override init(frame: NSRect) {
17701823
super.init(frame: frame)
17711824
setupPanel()
@@ -1804,6 +1857,7 @@ class SettingsPanel: NSVisualEffectView {
18041857
selectedMode = startScreen.getSelectedMode()
18051858
blurIntensity = startScreen.getBlurIntensity()
18061859
customImage = startScreen.getCustomImage()
1860+
hideSelfFromPreview = startScreen.getHideSelfFromPreview()
18071861

18081862
switch selectedMode {
18091863
case .blur: modeSegmented.selectedSegment = 0

Cloak/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleShortVersionString</key>
6-
<string>1.3.0</string>
6+
<string>1.3.1</string>
77
<key>CFBundleVersion</key>
8-
<string>4</string>
8+
<string>5</string>
99
<key>NSScreenCaptureUsageDescription</key>
1010
<string>Cloak needs to capture your screen to create a preview window that you can share.</string>
1111
</dict>

0 commit comments

Comments
 (0)