From c8e84f693a67933a6f4a319465b0ac08c8ff4159 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Fri, 17 Jan 2025 01:08:09 +0200 Subject: [PATCH] changefile fix(window-state): Remove unnecessary reference in denylist pattern processing chore(changes): Update window-state and window-state-js versioning for glob pattern support docs(window-state): Update glob pattern denylist documentation for clarity --- .changes/window-state-glob-pattern-denylist.md | 6 ++++++ plugins/window-state/src/lib.rs | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/window-state-glob-pattern-denylist.md diff --git a/.changes/window-state-glob-pattern-denylist.md b/.changes/window-state-glob-pattern-denylist.md new file mode 100644 index 00000000..d5dbaab6 --- /dev/null +++ b/.changes/window-state-glob-pattern-denylist.md @@ -0,0 +1,6 @@ +--- +window-state: patch +window-state-js: patch +--- + +Introduces the ability to use glob patterns in the denylist for windows that shouldn't be tracked and managed. This allows for more flexible window matching, such as ignoring multiple windows that fit a certain naming pattern. diff --git a/plugins/window-state/src/lib.rs b/plugins/window-state/src/lib.rs index 9f0da1e0..365d86f0 100644 --- a/plugins/window-state/src/lib.rs +++ b/plugins/window-state/src/lib.rs @@ -352,7 +352,7 @@ impl Builder { let mut denylist_patterns = Vec::new(); for pattern in denylist { - denylist_patterns.push(glob::Pattern::new(&pattern)?); + denylist_patterns.push(glob::Pattern::new(pattern)?); } self.denylist = denylist_patterns; Ok(self) @@ -421,7 +421,6 @@ impl Builder { .map(|map| map(window.label())) .unwrap_or_else(|| window.label()); - for pattern in &self.denylist { if pattern.matches(label) { return;