From a4fde4a2c6b1527ac6308f68314cea23745c5f6d Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Mon, 13 Jul 2026 17:14:54 +0200 Subject: [PATCH] Conditionally included WebKit permission imports for Linux --- runtime/src/app_window.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/src/app_window.rs b/runtime/src/app_window.rs index 6f4b2967..fdac344d 100644 --- a/runtime/src/app_window.rs +++ b/runtime/src/app_window.rs @@ -22,8 +22,6 @@ use tauri_plugin_global_shortcut::GlobalShortcutExt; use tauri_plugin_opener::OpenerExt; use tokio::sync::broadcast; use tokio::time; -use webkit2gtk::glib::Cast; -use webkit2gtk::{PermissionRequestExt, UserMediaPermissionRequestExt}; use crate::api_token::APIToken; use crate::dotnet::{cleanup_dotnet_server, start_dotnet_server, stop_dotnet_server}; use crate::environment::{ @@ -32,9 +30,16 @@ use crate::environment::{ use crate::log::switch_to_file_logging; use crate::pdfium::PDFIUM_LIB_PATH; use crate::qdrant_edge_database::{start_qdrant_edge_database, stop_qdrant_edge_database}; + #[cfg(debug_assertions)] use crate::dotnet::create_startup_env_file; +#[cfg(target_os = "linux")] +use webkit2gtk::glib::Cast; + +#[cfg(target_os = "linux")] +use webkit2gtk::{PermissionRequestExt, UserMediaPermissionRequestExt}; + /// The Tauri main window. pub static MAIN_WINDOW: Lazy>> = Lazy::new(|| Mutex::new(None));