Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(desktop-gpui): stop warning about Cap's own windows missing from the Windows window list (#2440)

Luke Parker8cd0a0f75f5b
diff --git a/apps/desktop-gpui/src/app_windows.rs b/apps/desktop-gpui/src/app_windows.rs
index 539e0dbff..945606072 100644
--- a/apps/desktop-gpui/src/app_windows.rs
+++ b/apps/desktop-gpui/src/app_windows.rs
@@ -2712,9 +2712,10 @@ fn append_own_excluded_window_ids(
// `Window::from_id(&native_id).is_none()` (`:144-166`): a window that is
// not in the window list has nothing for the content filter to exclude.
// Loud when the window believes it is on screen, quiet when it is
- // merely hidden -- the same two log levels.
+ // merely hidden -- the same two log levels. Windows never lists this
+ // process's own windows; display affinity excludes them instead.
if scap_targets::Window::from_id(&id).is_none() {
- if window.visible {
+ if window.visible && !cfg!(windows) {
tracing::warn!(
title,
number,