Skip to content

Conversation

@crossatko
Copy link
Contributor

@crossatko crossatko commented Oct 15, 2025

Description:

Related discussion topic
Forum post

This PR enhances the Dwindle layout to correctly handle highly asymmetrical window gaps, fixing the issues demonstrated in the attached videos.

The previous, purely geometric approach to splitting windows didn't account for gaps. This led to incorrect split directions and invalid window sizes in certain edge cases.

The core layout logic in onWindowCreatedTiling and recalcSizePosRecursive has now been reworked to be fully "gap-aware." Splits are calculated based on the true available tiling area, resulting in consistent and intuitive behavior as shown in the "after" video.

Workspace rules in the video example
workspace = r[1-1]w[t1-8], gapsout:4 1500 4 4

Before

before.mp4

After

after.mp4

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I have tested this on both asymmetrical and standard configurations without issue. As this is a core logic change, wider community testing is needed to ensure full stability.

Is it ready for merging, or does it need work?

That is probably up to discussion.

vaxerski
vaxerski previously approved these changes Oct 18, 2025
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

lgtm, needs tests :)

Also rebase on main for ci fix

@crossatko
Copy link
Contributor Author

crossatko commented Oct 18, 2025

lgtm, needs tests :)

Also rebase on main for ci fix

Done, I've added a test handling window spawning position and had to update the split ratio test to expect new numbers based on the changed calculations. Are there any other tests that I should add?

PS: sorry for the mess in pr labels, I F'd up the rebase...

@BeyondMagic
Copy link
Contributor

Unrelated, sorry, but how do you make your window show the width/height while resizing with your cursor?

image

@crossatko
Copy link
Contributor Author

Unrelated, sorry, but how do you make your window show the width/height while resizing with your cursor?

Pretty sure kitty does it by default. I did not set anything.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

very nice

@crossatko crossatko reopened this Oct 22, 2025
@vaxerski
Copy link
Member

thank you!

@vaxerski vaxerski merged commit 151b5f6 into hyprwm:main Oct 24, 2025
24 of 25 checks passed
@vaxerski
Copy link
Member

reverting due to #12380

The specified usecase is flawed to begin with. I'll write a better one (using reserved area instead of cursed gaps instead)

vaxerski added a commit that referenced this pull request Nov 17, 2025
@vaxerski
Copy link
Member

or we could just rewrite how gaps out work tbh that'd work too.

vaxerski added a commit that referenced this pull request Nov 18, 2025
vaxerski added a commit to vaxerski/Hyprland that referenced this pull request Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants