diff --git a/plugins/window-state/src/lib.rs b/plugins/window-state/src/lib.rs index e8bf3f1f..1f4abdd6 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -321,7 +321,7 @@ impl WindowExtInternal for Window { #[derive(Default)] pub struct Builder { denylist: HashSet, - filter_callback: Option>>, + filter_callback: Option>, skip_initial_state: HashSet, state_flags: StateFlags, map_label: Option>, @@ -358,7 +358,7 @@ impl Builder { where F: Fn(&str) -> bool + Send + Sync + 'static, { - self.filter_callback = Some(Arc::new(Mutex::new(filter_callback))); + self.filter_callback = Some(Box::new(filter_callback)); self } @@ -432,7 +432,6 @@ impl Builder { // Check deny list callback if let Some(filter_callback) = &self.filter_callback { - let filter_callback = filter_callback.lock().unwrap(); // Don't save the state if the callback returns false if !filter_callback(label) { return;