Create polished demo videos without editing skills. Mac/Windows/Linux
fix: filter auxiliary windows and remove thumbnail requirement from source list
webadderall09341587d4ff
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex d9cbe35e..357bff02 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -2950,7 +2950,6 @@ export function registerIpcHandlers(sourceType: 'window' as const,}})- .filter((source) => Boolean(source.thumbnail))return [...screenSources, ...mergedWindowSources]} catch (error) {@@ -2958,7 +2957,6 @@ export function registerIpcHandlers(const windowSources = electronSources.filter((source) => source.id.startsWith('window:'))- .filter((source) => hasUsableSourceThumbnail(source.thumbnail)).filter((source) => {const normalizedName = normalizeDesktopSourceName(source.name)if (!normalizedName) {diff --git a/electron/native/ScreenCaptureKitWindowList.swift b/electron/native/ScreenCaptureKitWindowList.swiftindex 3fc6d0dd..cdb2f575 100644--- a/electron/native/ScreenCaptureKitWindowList.swift+++ b/electron/native/ScreenCaptureKitWindowList.swift@@ -49,7 +49,14 @@ group.enter()Task {do {let shareableContent = try await SCShareableContent.excludingDesktopWindows(false, onScreenWindowsOnly: true)- let entries = shareableContent.windows.compactMap { window -> WindowListEntry? in++ struct RawWindowEntry {+ let entry: WindowListEntry+ let hasRawTitle: Bool+ let bundleId: String?+ }++ let rawEntries = shareableContent.windows.compactMap { window -> RawWindowEntry? inlet appName = normalize(window.owningApplication?.applicationName)let windowTitle = normalize(window.title)let bundleId = normalize(window.owningApplication?.bundleIdentifier)@@ -59,7 +66,7 @@ Task {return nil}- guard frame.width > 1, frame.height > 1 else {+ guard frame.width >= 50, frame.height >= 50 else {return nil}@@ -87,7 +94,7 @@ Task {resolvedName = resolvedWindowTitle}- return WindowListEntry(+ let entry = WindowListEntry(id: "window:\(window.windowID):0",name: resolvedName,display_id: matchedDisplay.map { String($0.displayID) } ?? "",@@ -99,7 +106,29 @@ Task {width: Double(frame.width),height: Double(frame.height))++ return RawWindowEntry(entry: entry, hasRawTitle: windowTitle != nil, bundleId: bundleId)}++ // For apps with multiple windows, drop auxiliary windows that lack a+ // distinct title (e.g. Arc's sidebar/tab-bar chrome). If ALL windows+ // from an app lack titles, keep them all.+ var titledCountByBundle: [String: Int] = [:]+ for raw in rawEntries {+ if let bid = raw.bundleId, raw.hasRawTitle {+ titledCountByBundle[bid, default: 0] += 1+ }+ }++ let entries = rawEntries+ .filter { raw in+ guard let bid = raw.bundleId else { return true }+ if let titled = titledCountByBundle[bid], titled > 0 {+ return raw.hasRawTitle+ }+ return true+ }+ .map { $0.entry }.sorted { lhs, rhs inlet lhsApp = lhs.appName ?? lhs.namelet rhsApp = rhs.appName ?? rhs.namediff --git a/electron/native/bin/darwin-arm64/openscreen-window-list b/electron/native/bin/darwin-arm64/openscreen-window-listindex ddea8efe..aa268ffd 100755Binary files a/electron/native/bin/darwin-arm64/openscreen-window-list and b/electron/native/bin/darwin-arm64/openscreen-window-list differ