Skip to content

Commit

Permalink
#297 properly handle manage=on|off for windows that are already tiled…
Browse files Browse the repository at this point in the history
…/untiled
  • Loading branch information
koekeishiya committed Nov 9, 2019
1 parent bbaee1e commit a9c0eb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Changing border properties should not cause borders of minimized windows or hidden applications to be redrawn [#305](https://github.com/koekeishiya/yabai/issues/305)
- Automatically truncate title of window drawn in status_bar if it would overlap with other parts of the bar [#214](https://github.com/koekeishiya/yabai/issues/214)
- Remove throttling for mouse-drag move and lessen throttling for mouse-drag resize [#285](https://github.com/koekeishiya/yabai/issues/285)
- Properly float/unfloat windows that are tiled/untiled when marked as managed=on|off with a rule [#297](https://github.com/koekeishiya/yabai/issues/297)

## [2.0.1] - 2019-09-04
### Changed
Expand Down
15 changes: 15 additions & 0 deletions src/window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,22 @@ void window_manager_apply_rule_to_window(struct space_manager *sm, struct window

if (rule->manage == RULE_PROP_ON) {
window->rule_manage = true;
window->is_floating = false;
window_manager_make_children_floating(wm, window, false);
window_manager_make_floating(wm, window->id, false);
if ((window_manager_should_manage_window(window)) &&
(!window_manager_find_managed_window(wm, window))) {
struct view *view = space_manager_tile_window_on_space(sm, window, space_manager_active_space());
window_manager_add_managed_window(wm, window, view);
}
} else if (rule->manage == RULE_PROP_OFF) {
window->rule_manage = false;
struct view *view = window_manager_find_managed_window(wm, window);
if (view) {
space_manager_untile_window(sm, view, window);
window_manager_remove_managed_window(wm, window->id);
window_manager_purify_window(wm, window);
}
window_manager_make_children_floating(wm, window, true);
window_manager_make_floating(wm, window->id, true);
window->is_floating = true;
Expand Down

0 comments on commit a9c0eb8

Please sign in to comment.