Skip to content

Conversation

@tarek-y-ismail
Copy link
Contributor

@tarek-y-ismail tarek-y-ismail commented Jan 16, 2026

Closes #3274

What's new?

  • What it says on the tin.

How to test

  1. Run mir with layer shell:
miral-app --add-wayland-extensions=zwlr_layer_shell_v1
  1. Set waybar to be on the "bottom" layer (`~/.config/waybar/config):
{
    "layer": "bottom", // Waybar at top layer
   ...
}
  1. Start an application, a terminal for example
  2. Maximize it, it should take up all screen area until it hits waybar.
  3. Fullscreen it, it should take up the whole output
  4. Change the layer configuration waybar's config to be "top"
  5. Repeat step 4. Behavior should be identical
  6. Repeat step 5. The application should take up all the screen except for the area used by waybar.

Checklist

  • Tests added and pass

@tarek-y-ismail tarek-y-ismail self-assigned this Jan 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies fullscreen window placement logic to respect exclusion zones from windows in higher depth layers, addressing issue #3274.

Changes:

  • Updated fullscreen window placement to consider exclusion zones from higher layers instead of always ignoring them
  • Added new method calculate_application_zone_for_depth_layer() to compute application zones based on depth layer hierarchy
  • Modified test cases to reflect the new behavior where fullscreen windows respect exclusion zones

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/miral/window_placement_attached.cpp Updated test names and expectations to verify fullscreen windows now respect exclusion zones from higher layers
src/miral/basic_window_manager.h Added declaration for calculate_application_zone_for_depth_layer() method and changed apply_exclusive_rect_to_application_zone() to non-static
src/miral/basic_window_manager.cpp Implemented depth-layer-aware exclusion zone calculation and moved fullscreen surface placement to occur after application zone calculation

@tarek-y-ismail tarek-y-ismail force-pushed the MIRENG-457/fullscreen-windows-appear-behind-shell-components branch from 281b1e0 to 1662758 Compare January 19, 2026 15:55
@tarek-y-ismail tarek-y-ismail marked this pull request as ready for review January 19, 2026 16:03
@tarek-y-ismail tarek-y-ismail requested a review from a team as a code owner January 19, 2026 16:03
Copy link
Contributor

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually not sold on this approach.

It assumes shell components will normally be placed below / bottom, which I don't think will normally be the case?

It's common to be able to push a restored window under a panel, which only works if they're placed above / top?

@github-actions
Copy link

TICS Quality Gate

✔️ Passed

mir

Coding Standards: ✔️ Passed

✔️ Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.

See the results in the TICS Viewer

The following files have been checked for this project
  • src/miral/basic_window_manager.cpp
  • src/miral/basic_window_manager.h

TICS / TICS / Run TICS analysis

@tarek-y-ismail
Copy link
Contributor Author

It's common to be able to push a restored window under a panel, which only works if they're placed above / top?

I can't entirely follow. Can you provide a more concrete example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows marked mir_window_state_fullscreen appear behind shell components

3 participants