Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
IsFullscreen.rs

1//! Wire method: `nativeHost:isFullscreen`.
2//! Returns true if the `main` webview window is fullscreen. Missing window
3//! returns false - this is a read-only probe and should not error.
4
5use serde_json::{Value, json};
6use tauri::{AppHandle, Manager};
7
8pub async fn Fn(ApplicationHandle:AppHandle) -> Result<Value, String> {
9	let Window = ApplicationHandle.get_webview_window("main");
10
11	if let Some(W) = Window {
12		Ok(json!(W.is_fullscreen().unwrap_or(false)))
13	} else {
14		Ok(json!(false))
15	}
16}