diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 4cb68b1..0d9cbe7 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -494,6 +494,15 @@ pub fn run() { .visible(false) .initialization_script(NOTIFICATION_BRIDGE) .disable_drag_drop_handler() + // P5-42: keep the WebView2 renderer running full-speed while the + // app is closed to the tray, so the Matrix /sync loop and + // notifications aren't throttled/backgrounded by Chromium. Preserves + // Tauri's default WebView2 args (setting this overrides them) and + // appends the Chromium background-throttling disables. Windows-only + // in effect; harmless elsewhere. Does not block system sleep. + .additional_browser_args( + "--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection --disable-background-timer-throttling --disable-renderer-backgrounding --disable-backgrounding-occluded-windows", + ) .on_page_load(|window, payload| { if matches!(payload.event(), PageLoadEvent::Finished) { let _ = window.show();