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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
Revert "fix: keep screenpipe visible in Windows taskbar"
Louis Beaumontd2fe89ab4b96
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 3dd9f033e..8872842f6 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -1350,12 +1350,11 @@ async fn main() {let _ = window.set_visible_on_all_workspaces(false);#[cfg(target_os = "macos")]crate::window_api::reset_to_regular_and_refresh_tray(window.app_handle());- // On Windows, minimize main windows so they stay visible in the- // taskbar instead of vanishing to the tray. Only hide non-main- // windows (e.g. notifications, settings).+ // On Windows, minimize the main windowed window so it stays+ // visible in the taskbar instead of vanishing to the tray.#[cfg(target_os = "windows")]{- if window.label() == "main-window" || window.label() == "main" {+ if window.label() == "main-window" {let _ = window.minimize();} else {let _ = window.hide();diff --git a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rsindex 45fdb0077..8853764a5 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs@@ -1450,9 +1450,8 @@ impl ShowRewindWindow {.position(position.x as f64, position.y as f64);let win = builder.build()?;- // Setup Win32 overlay with click-through disabled so user can interact.- // show_in_taskbar=true so the app remains visible in the Windows taskbar.- if let Err(e) = crate::windows_overlay::setup_overlay_ex(&win, false, true) {+ // Setup Win32 overlay with click-through disabled so user can interact+ if let Err(e) = crate::windows_overlay::setup_overlay(&win, false) {error!("Failed to setup Windows overlay: {}", e);}@@ -1903,12 +1902,12 @@ impl ShowRewindWindow {}#[cfg(target_os = "windows")]{- // Minimize instead of hide so the window stays in the taskbar.- // hide() removes the window from the taskbar entirely on Windows.- // The webview survives a minimize just as it survives a hide.+ // Hide instead of close/destroy so the webview survives for reopen.+ // Destroying the window causes re-creation with visible(false) and+ // the overlay show path never makes it visible again.for label in &["main", "main-window"] {if let Some(window) = app.get_webview_window(label) {- window.minimize().ok();+ window.hide().ok();}}}diff --git a/apps/screenpipe-app-tauri/src-tauri/src/windows_overlay.rs b/apps/screenpipe-app-tauri/src-tauri/src/windows_overlay.rsindex 117fe7a32..a7c2e0503 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/windows_overlay.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/windows_overlay.rs@@ -48,21 +48,10 @@ pub fn get_hwnd(window: &WebviewWindow) -> Option<HWND> {////// This sets up the window with:/// - WS_EX_LAYERED: Required for transparency and click-through-/// - WS_EX_TOOLWINDOW: Prevents showing in taskbar/alt-tab (unless show_in_taskbar is true)+/// - WS_EX_TOOLWINDOW: Prevents showing in taskbar/alt-tab+/// - WS_EX_NOACTIVATE: Prevents stealing focus/// - HWND_TOPMOST: Always on top of other windows-///-/// Set `show_in_taskbar` to true for the main overlay window so the app-/// remains visible in the Windows taskbar.pub fn setup_overlay(window: &WebviewWindow, click_through: bool) -> Result<(), String> {- setup_overlay_ex(window, click_through, false)-}--/// Like `setup_overlay` but with explicit taskbar visibility control.-pub fn setup_overlay_ex(- window: &WebviewWindow,- click_through: bool,- show_in_taskbar: bool,-) -> Result<(), String> {let hwnd = get_hwnd(window).ok_or("Failed to get HWND")?;unsafe {@@ -72,11 +61,6 @@ pub fn setup_overlay_ex(// Build new style with overlay flagslet mut new_style = current_style | OVERLAY_EX_STYLE;- // Remove WS_EX_TOOLWINDOW if the window should appear in the taskbar- if show_in_taskbar {- new_style &= !(WS_EX_TOOLWINDOW.0 as i32);- }-if click_through {new_style |= CLICK_THROUGH_STYLE;}