diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7d0c3b..c0c09a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Assigning a window to scratchpad using rules would incorrectly hide that window immediately [#2203](https://github.com/koekeishiya/yabai/issues/2203) ## [7.1.0] - 2024-04-04 ### Added diff --git a/src/window_manager.c b/src/window_manager.c index 73746c8e..dd06c18d 100644 --- a/src/window_manager.c +++ b/src/window_manager.c @@ -158,9 +158,7 @@ void window_manager_apply_rule_effects_to_window(struct space_manager *sm, struc if (effects->scratchpad) { char *scratchpad = string_copy(effects->scratchpad); - if (window_manager_set_scratchpad_for_window(wm, window, scratchpad)) { - window_manager_toggle_scratchpad_window(wm, window, 1); - } else { + if (!window_manager_set_scratchpad_for_window(wm, window, scratchpad)) { free(scratchpad); } }