INNER CODE UNIT · Rust
Some
Blur009/Blur-AutoClicker · src-tauri/src/lib.rs:123
if let Some(dir) = crate::portable::webview_dir("main") {
log::info!("[Window] Main window webview data dir: {}", dir.display());
builder = builder.data_directory(dir);
}
let window = builder.build()?;
// Re-apply the window icon once the window is registered with the taskbar
// (first focus/resize), because Explorer may have cached the EXE icon into
// the taskbar slot before our WM_SETICON at creation arrived.
#[cfg(target_os = "windows")]
{
let applied = std::sync::atomic::AtomicBool::new(false);
let handle = app.handle().clone();
window.on_window_event(move |event| {
let fire = matches!(
event,
tauri::WindowEvent::Focused(true) | tauri::WindowEvent::Resized(_)