Skip to content

layout/scrolling: fix inconsistent column widths at tape edges - #16581

Draft
erstarr wants to merge 1 commit into
hyprwm:mainfrom
erstarr:scrollingGapPatch
Draft

erstarr wants to merge 1 commit into
hyprwm:mainfrom
erstarr:scrollingGapPatch

Conversation

@erstarr

@erstarr erstarr commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

Applying @LuYishan-4 's patch.
Original MR: #16489
Applying on behalf of LuYishan-4 with their permission.
I have reviewed this MR myself, and it has my approval.

Description taken directly from their MR:

Fixes #16422.

In the scrolling layout, the first and last columns on the tape did not receive gaps_in on their outer edge, while columns between them received gaps on both sides.

This caused edge columns to have a different visual width from otherwise identical middle columns. For example, with a symmetric gaps_in of 5px, an edge column was effectively 5px wider than a middle column.

This is incorrect for a scrolling layout because the edges of the tape are not fixed viewport edges: the tape moves relative to the viewport.

This PR removes the per-column left/right edge checks and applies the primary-axis gap consistently to both sides of every column.

For horizontal scrolling:

before:

first:   W - right gap
middle:  W - left gap - right gap
last:    W - left gap

after:

first:   W - left gap - right gap
middle:  W - left gap - right gap
last:    W - left gap - right gap

The same logic is applied to vertical scrolling using the top and bottom gaps.

The existing scrolling tests were also updated to reflect the corrected window sizes and positions.

This also removes the geometry mismatch that could make the viewport appear to self-correct by a few pixels when moving focus between edge and non-edge columns, including cases exposed by fullscreen viewport restoration work such as #16318.

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

No

Did you use AI in any way shape or form in the making of this PR? If so, detail how you used it. (Undisclosed AI use is a violation of the AI Policy and is punishable)

No

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

There is no need for an explicit test of this, as other tests rely on this and by correcting their values, this is also tested.

  • Lots of failing tests

@erstarr
erstarr marked this pull request as ready for review October 17, 2026 18:38
@github-actions
github-actions Bot requested a review from vaxerski October 17, 2026 18:38
@erstarr
erstarr marked this pull request as draft October 17, 2026 21:58
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.

Scrolling: Left and rightmost columns are wider than those between them by X:3

2 participants