Skip to content

Fix double-subtraction of strut in _NET_WORKAREA height#70

Merged
fredkiefer merged 1 commit intognustep:masterfrom
okt:pr/offset-fix
Jan 31, 2026
Merged

Fix double-subtraction of strut in _NET_WORKAREA height#70
fredkiefer merged 1 commit intognustep:masterfrom
okt:pr/offset-fix

Conversation

@okt
Copy link
Contributor

@okt okt commented Jan 31, 2026

Per the EWMH spec, _NET_WORKAREA returns a geometry that already excludes space reserved by _NET_WM_STRUT. Subtracting origin.y from the height double-counted the top strut, making the reported workarea shorter than it should be.

For example, a 22px top strut on a 1080px screen yields _NET_WORKAREA height=1058. The code subtracted 22 again, producing height=1036 — a 22px shortfall causing mispositioned windows.

Remove the incorrect height adjustment; keep the origin.y zeroing for GNUstep's bottom-left coordinate system.

Bug uncovered while developing Gershwin Desktop.

Per the EWMH spec, _NET_WORKAREA returns a geometry that already
excludes space reserved by _NET_WM_STRUT. Subtracting origin.y from
the height double-counted the top strut, making the reported workarea
shorter than it should be.

For example, a 22px top strut on a 1080px screen yields
_NET_WORKAREA height=1058. The code subtracted 22 again, producing
height=1036 — a 22px shortfall causing mispositioned windows.

Remove the incorrect height adjustment; keep the origin.y zeroing
for GNUstep's bottom-left coordinate system.

Bug uncovered while developing Gershwin Desktop (https://github.com/gershwin-desktop).
@okt okt requested a review from fredkiefer as a code owner January 31, 2026 04:04
@fredkiefer fredkiefer merged commit bf3b3ce into gnustep:master Jan 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments