From 7a2de0a03bc6a4b308a21398051f6f4ce2801e67 Mon Sep 17 00:00:00 2001 From: liam Date: Tue, 2 Apr 2024 14:46:37 -0700 Subject: [PATCH] force explorer window with title in capture_window example --- examples/capture_window.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/capture_window.rs b/examples/capture_window.rs index 4518af6c..af9829a5 100644 --- a/examples/capture_window.rs +++ b/examples/capture_window.rs @@ -18,7 +18,7 @@ fn main() { let content = CapturableContent::new(filter).await.unwrap(); let window = content.windows().filter(|window| { let app_identifier = window.application().identifier(); - app_identifier.to_lowercase().contains("finder") || app_identifier.to_lowercase().contains("explorer") + window.title().len() != 0 && (app_identifier.to_lowercase().contains("finder") || app_identifier.to_lowercase().contains("explorer")) }).next(); match window { Some(window) => {