Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

release-app: correct window focus for windows

Louis Beaumont6d03f291f102
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 816a87e76..092b467a8 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.17.2"
+version = "0.17.3"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-vision/Cargo.toml b/screenpipe-vision/Cargo.toml
index 93c58f47f..bb8ddbe59 100644
--- a/screenpipe-vision/Cargo.toml
+++ b/screenpipe-vision/Cargo.toml
@@ -88,11 +88,11 @@ path = "examples/websocket.rs"
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.58", features = ["Graphics_Imaging", "Media_Ocr", "Storage", "Storage_Streams"] }
-xcap = "0.0.12"
+xcap-macoswin = { package = "xcap", git = "https://github.com/mediar-ai/xcap", rev = "965bc99" }
[target.'cfg(target_os = "macos")'.dependencies]
libc = "=0.2.164"
-xcap-macos = { package = "xcap", git = "https://github.com/mediar-ai/xcap", rev = "965bc99" }
+xcap-macoswin = { package = "xcap", git = "https://github.com/mediar-ai/xcap", rev = "965bc99" }
[target.'cfg(target_os = "linux")'.dependencies]
libc = "=0.2.164"
diff --git a/screenpipe-vision/src/capture_screenshot_by_window.rs b/screenpipe-vision/src/capture_screenshot_by_window.rs
index 9cc00491f..559f9f482 100644
--- a/screenpipe-vision/src/capture_screenshot_by_window.rs
+++ b/screenpipe-vision/src/capture_screenshot_by_window.rs
@@ -7,10 +7,10 @@ use std::fmt;
use std::time::Duration;
use tokio::time;
-#[cfg(target_os = "macos")]
-use xcap_macos::{Monitor, Window, XCapError};
+#[cfg(not(target_os = "linux"))]
+use xcap_macoswin::{Monitor, Window, XCapError};
-#[cfg(not(target_os = "macos"))]
+#[cfg(target_os = "linux")]
use xcap::{Monitor, Window, XCapError};
#[derive(Debug)]
diff --git a/screenpipe-vision/src/core.rs b/screenpipe-vision/src/core.rs
index 3dea68919..8151defbf 100644
--- a/screenpipe-vision/src/core.rs
+++ b/screenpipe-vision/src/core.rs
@@ -24,10 +24,10 @@ use std::{
use tokio::sync::mpsc::Sender;
use tokio::time::sleep;
-#[cfg(target_os = "macos")]
-use xcap_macos::Monitor;
+#[cfg(not(target_os = "linux"))]
+use xcap_macoswin::Monitor;
-#[cfg(not(target_os = "macos"))]
+#[cfg(not(target_os = "linux"))]
use xcap::Monitor;
pub struct CaptureResult {
diff --git a/screenpipe-vision/src/monitor.rs b/screenpipe-vision/src/monitor.rs
index 142c6c49a..18d6a16e5 100644
--- a/screenpipe-vision/src/monitor.rs
+++ b/screenpipe-vision/src/monitor.rs
@@ -1,7 +1,7 @@
-#[cfg(target_os = "macos")]
-use xcap_macos::Monitor;
+#[cfg(not(target_os = "linux"))]
+use xcap_macoswin::Monitor;
-#[cfg(not(target_os = "macos"))]
+#[cfg(target_os = "linux")]
use xcap::Monitor;
pub async fn list_monitors() -> Vec<Monitor> {
diff --git a/screenpipe-vision/src/utils.rs b/screenpipe-vision/src/utils.rs
index 75a1eb828..be93bdfc3 100644
--- a/screenpipe-vision/src/utils.rs
+++ b/screenpipe-vision/src/utils.rs
@@ -8,10 +8,10 @@ use log::{debug, error, warn};
use std::hash::{DefaultHasher, Hash, Hasher};
use std::time::{Duration, Instant};
-#[cfg(target_os = "macos")]
-use xcap_macos::Monitor;
+#[cfg(not(target_os = "linux"))]
+use xcap_macoswin::Monitor;
-#[cfg(not(target_os = "macos"))]
+#[cfg(target_os = "linux")]
use xcap::Monitor;
#[derive(Clone, Debug, Copy)]