From be95a94ba613cb240ab075ee4607345cb42e1718 Mon Sep 17 00:00:00 2001 From: koekeishiya Date: Mon, 19 Sep 2022 21:20:02 +0200 Subject: [PATCH] #1429 make window zoom more flexible --- CHANGELOG.md | 1 + src/window_manager.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c50212a..7b180c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Clamp split ratio instead of resetting when an out of range / invalid value is given [#1401](https://github.com/koekeishiya/yabai/pull/1401) - Applying rule with property *manage=on* would cause both minimized and hidden windows to be managed, even though the window is not visible [#1418](https://github.com/koekeishiya/yabai/issues/1418) - Fix regression causing window sticky to not work properly [#1424](https://github.com/koekeishiya/yabai/issues/1424) +- Make window zoom more flexible, allow parent-zoomed window to enter fullscreen and vice versa [#1429](https://github.com/koekeishiya/yabai/issues/1429) ## [4.0.4] - 2022-09-08 ### Changed diff --git a/src/window_manager.c b/src/window_manager.c index 8c7247ff..21267f97 100644 --- a/src/window_manager.c +++ b/src/window_manager.c @@ -1617,13 +1617,13 @@ void window_manager_toggle_window_parent(struct space_manager *sm, struct window struct window_node *node = view_find_window_node(view, window->id); assert(node); - if (node->zoom) { + if (node->zoom == node->parent) { node->zoom = NULL; + window_node_flush(node); } else if (node->parent) { node->zoom = node->parent; + window_node_flush(node); } - - window_node_flush(node); } void window_manager_toggle_window_fullscreen(struct space_manager *sm, struct window_manager *wm, struct window *window) @@ -1634,13 +1634,13 @@ void window_manager_toggle_window_fullscreen(struct space_manager *sm, struct wi struct window_node *node = view_find_window_node(view, window->id); assert(node); - if (node->zoom) { + if (node->zoom == view->root) { node->zoom = NULL; + window_node_flush(node); } else { node->zoom = view->root; + window_node_flush(node); } - - window_node_flush(node); } void window_manager_toggle_window_expose(struct window_manager *wm, struct window *window)