Skip to content

Commit

Permalink
(#388) if a window starts attached or hidden, then it should not beco…
Browse files Browse the repository at this point in the history
…me a leaf (#389)
  • Loading branch information
mattkae authored Feb 12, 2025
1 parent fafa0e2 commit 75cf489
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ AllocationHint Output::allocate_position(
miral::WindowSpecification& requested_specification,
AllocationHint hint)
{
auto has_exclusive_rect = requested_specification.exclusive_rect().is_set();
auto is_attached = requested_specification.attached_edges().is_set();
if (has_exclusive_rect || is_attached)
auto const has_exclusive_rect = requested_specification.exclusive_rect().is_set();
auto const is_attached = requested_specification.attached_edges().is_set();
auto const wrong_leaf_state = requested_specification.state() == mir_window_state_hidden
|| requested_specification.state() == mir_window_state_attached;
if (has_exclusive_rect || is_attached || wrong_leaf_state)
hint.container_type = ContainerType::shell;
else
{
Expand Down

0 comments on commit 75cf489

Please sign in to comment.