Make sure to call init_spotlight_window in the correct window on the frontend
I was making this mistake where I was calling init_spotlight in a different window than the actual target window and then trying to hide the panel using the ESC key, which then invokes hide_window and the app kept crashing.
Here's a error message for anyone googling it.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/spotlight.rs:149:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Also make sure to set the correct panel label on line 113 of spotlight.rs
static PANEL_LABEL: &str = "main"; // Defaults to main
Make sure to call
init_spotlight_window
in the correct window on the frontendI was making this mistake where I was calling
init_spotlight
in a different window than the actual target window and then trying to hide the panel using theESC
key, which then invokeshide_window
and the app kept crashing.Here's a error message for anyone googling it.
Also make sure to set the correct panel label on line 113 of
spotlight.rs
static PANEL_LABEL: &str = "main"; // Defaults to main