Skip to content

dBasic window manager cleanups#4669

Open
tarek-y-ismail wants to merge 2 commits intomainfrom
basic-window-manager-cleanups
Open

dBasic window manager cleanups#4669
tarek-y-ismail wants to merge 2 commits intomainfrom
basic-window-manager-cleanups

Conversation

@tarek-y-ismail
Copy link
Contributor

Just some cleanups that I found while working on #4664 and don't quite fit there.

@tarek-y-ismail tarek-y-ismail self-assigned this Feb 6, 2026
@tarek-y-ismail tarek-y-ismail requested a review from a team as a code owner February 6, 2026 15:40
Copy link
Contributor

@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.

Sorry, don't have good suggestions: center_horizontally_with_clamp_left() is just as confusing and even longer

namespace
{
void clamp_left(Rectangle const& zone, Rectangle& rect)
void center_horizontally_in_zone(Rectangle const& zone, Rectangle& rect)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't the new name also confusing? If rect is wider than zone the placement is not centered horizontally, but clamped to the left. (No, that isn't a defense of the old name.)

}

void clamp_top(Rectangle const& zone, Rectangle& rect)
void center_vertically_in_zone(Rectangle const& zone, Rectangle& rect)
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't the new name also confusing? If rect is taller than zone the placement is not centered vertically, but clamped to the top.

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