master
John Lauer v2.0.720 (insiders): Groundwork for the macOS build of the Rust pup (Kyle's pull request #3, pup-bridge#128): the Mac h… 87f5051 27d ago
//! Do CGWindowList rows carry titles from this process (needs Screen Recording for other apps)?
use pup_host::HostWindows;
fn main() {
    let h = pup_host_mac::MacHost;
    let rows = h.windows_for_pids(&[], None);
    let titled = rows.iter().filter(|w| !w.title.is_empty()).count();
    println!("{} windows, {} with titles; chromium: {:?}", rows.len(), titled, rows.iter().filter(|w| w.class.to_lowercase().contains("chrome")).map(|w| (w.pid, w.title.chars().take(30).collect::<String>())).take(5).collect::<Vec<_>>());
}