Skip to content

Commit

Permalink
#211 toggling border should not cancel window zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Aug 17, 2019
1 parent 27356fd commit 68c3d26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Global space settings should properly apply again [#176](https://github.com/koekeishiya/yabai/issues/176)
- Fixed an issue that could cause windows to be overlapped when tiled [#183](https://github.com/koekeishiya/yabai/issues/183)
- Verify that a message was given before trying to connect to the running yabai instance [#197](https://github.com/koekeishiya/yabai/issues/197)
- Properly re-zoom a window when toggling its border [#211](https://github.com/koekeishiya/yabai/issues/211)

## [1.1.2] - 2019-07-15
### Changed
Expand Down
6 changes: 3 additions & 3 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,14 +956,14 @@ static EVENT_CALLBACK(EVENT_HANDLER_MOUSE_UP)
if (src_view->sid == dst_view->sid) {
if (a_node && b_node) {
a_node->window_id = window->id;
a_node->zoom = NULL;
b_node->window_id = g_mouse_state.window->id;
b_node->zoom = NULL;
window_node_flush(a_node);
window_node_flush(b_node);
a_node->zoom = NULL;
b_node->zoom = NULL;
} else if (a_node) {
window_node_flush(a_node);
a_node->zoom = NULL;
window_node_flush(a_node);
}
} else {
space_manager_untile_window(&g_space_manager, src_view, g_mouse_state.window);
Expand Down
9 changes: 7 additions & 2 deletions src/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,13 @@ void window_node_flush(struct window_node *node)
struct window *window = window_manager_find_window(&g_window_manager, node->window_id);
if (window) {
float offset = window_node_border_window_offset(window);
window_manager_move_window(window, node->area.x + offset, node->area.y + offset);
window_manager_resize_window(window, node->area.w - 2*offset, node->area.h - 2*offset);
if (node->zoom) {
window_manager_move_window(window, node->zoom->area.x + offset, node->zoom->area.y + offset);
window_manager_resize_window(window, node->zoom->area.w - 2*offset, node->zoom->area.h - 2*offset);
} else {
window_manager_move_window(window, node->area.x + offset, node->area.y + offset);
window_manager_resize_window(window, node->area.w - 2*offset, node->area.h - 2*offset);
}
}
}

Expand Down

0 comments on commit 68c3d26

Please sign in to comment.