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

fix: keep screenpipe visible in Windows taskbar in window mode

Louis Beaumont9e748ce1c2ae
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
index 3dd9f033e..251a4e5c9 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs
@@ -1350,12 +1350,12 @@ 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 "main-window" (window mode) so it stays
+ // in the taskbar. Hide everything else — "main" (fullscreen
+ // overlay) is a transparent panel that doesn't belong in taskbar.
#[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.rs
index 45fdb0077..65d48bb17 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/window_api.rs
@@ -1451,8 +1451,10 @@ impl ShowRewindWindow {
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) {
+ // Fullscreen overlay uses WS_EX_TOOLWINDOW (hidden from taskbar) —
+ // this is intentional since it's a transparent fullscreen panel.
+ // The "window" mode path keeps the app in the taskbar instead.
+ if let Err(e) = crate::windows_overlay::setup_overlay(&win, false) {
error!("Failed to setup Windows overlay: {}", e);
}
@@ -1903,13 +1905,14 @@ 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.
- for label in &["main", "main-window"] {
- if let Some(window) = app.get_webview_window(label) {
- window.minimize().ok();
- }
+ // "main-window" (window mode): minimize so it stays in the taskbar.
+ // "main" (fullscreen overlay): hide — it's a transparent fullscreen
+ // panel that doesn't belong in the taskbar.
+ if let Some(window) = app.get_webview_window("main-window") {
+ window.minimize().ok();
+ }
+ if let Some(window) = app.get_webview_window("main") {
+ 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.rs
index 117fe7a32..43c398157 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,9 @@ 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
/// - 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 +60,6 @@ pub fn setup_overlay_ex(
// Build new style with overlay flags
let 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;
}