fix(backend): show window before ignoring cursor events

Previously, when built, ignoring cursor events before the window was shown resulted in a panic!() from tao. Now, by moving show() to before the call, the panic is resolved.
This commit is contained in:
ByteAtATime 2025-06-22 19:17:14 -07:00
parent b8d87a745f
commit 223f7960aa
No known key found for this signature in database

View file

@ -75,13 +75,13 @@ async fn show_hud(app: tauri::AppHandle, title: String) -> Result<(), String> {
};
let window_clone = hud_window.clone();
window_clone.show().map_err(|e| e.to_string())?;
window_clone
.emit("hud-message", &title)
.map_err(|e| e.to_string())?;
window_clone
.set_ignore_cursor_events(true)
.map_err(|e| e.to_string())?;
window_clone.show().map_err(|e| e.to_string())?;
window_clone.set_focus().map_err(|e| e.to_string())?;
tauri::async_runtime::spawn(async move {