Skip to content

Commit

Permalink
bugfix: can resize X windows with decorations now
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Dec 29, 2023
1 parent f94b99b commit 04b1c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/miracle_window_management_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ template <typename T>
bool is_tileable(T& requested_specification)
{
auto t = requested_specification.type();
auto parent = requested_specification.parent();
auto state = requested_specification.state();
auto has_exclusive_rect = requested_specification.exclusive_rect().is_set();
return (t == mir_window_type_normal || t == mir_window_type_freestyle)
&& !parent
&& (state == mir_window_state_restored || state == mir_window_state_maximized)
&& !has_exclusive_rect;
}
Expand Down
6 changes: 6 additions & 0 deletions src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ void Node::set_rectangle(geom::Rectangle target_rect)
auto visible_rect = get_visible_area(target_rect, gap_x, gap_y);
window.move_to(visible_rect.top_left);
window.resize(visible_rect.size);
auto& window_info = tools.info_for(window);
for (auto child : window_info.children())
{
child.move_to(visible_rect.top_left);
child.resize(visible_rect.size);
}
}
else
{
Expand Down

0 comments on commit 04b1c6a

Please sign in to comment.