Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: when placing a surface that ignores exclusion zones, the application_zone should be the full display_area #3679

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

mattkae
Copy link
Contributor

@mattkae mattkae commented Nov 26, 2024

If the surface ignores exclusion zones, then we should use the display area instead of the application zone

cosmic-bg is now broken always as it should be 🎉

@mattkae mattkae requested a review from a team as a code owner November 26, 2024 16:16
Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

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

The place_new_surface() change is fine (have suggested a readability tweak).

The place_and_size_for_state() is likely harmless but pointless as we're not handling attached windows there. They are handled in modify_window()` which I think covers all the usecases.

Comment on lines 1376 to 1378
auto const ignore_exclusion_zones = modifications.ignore_exclusion_zones().is_set()
? modifications.ignore_exclusion_zones().value()
: window_info.ignore_exclusion_zones();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
auto const ignore_exclusion_zones = modifications.ignore_exclusion_zones().is_set()
? modifications.ignore_exclusion_zones().value()
: window_info.ignore_exclusion_zones();
auto const ignore_exclusion_zones = modifications.ignore_exclusion_zones().value_or(
window_info.ignore_exclusion_zones());

Copy link
Collaborator

Choose a reason for hiding this comment

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

But I notice that place_and_size_for_state() is not handling attached windows anyway. That isn't trivial to change, as the application zone extents may affected by the windows we may be trying to place. And that is beyond the scope of this function.

Comment on lines 1885 to 1886
auto const ignore_exclusion_zones = parameters.ignore_exclusion_zones().is_set()
&& parameters.ignore_exclusion_zones().value();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
auto const ignore_exclusion_zones = parameters.ignore_exclusion_zones().is_set()
&& parameters.ignore_exclusion_zones().value();
auto const ignore_exclusion_zones = parameters.ignore_exclusion_zones().value_or(false);

…ication_zone should be the full display_area
@mattkae mattkae force-pushed the bugfix/initial_placement_exclusion branch from 5069673 to 2c3d235 Compare November 26, 2024 18:59
Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

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

LGTM

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Nov 27, 2024
Merged via the queue into main with commit 86ece83 Nov 27, 2024
34 of 39 checks passed
@AlanGriffiths AlanGriffiths deleted the bugfix/initial_placement_exclusion branch November 27, 2024 08:54
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.

2 participants