Skip to content

x11: X11Surface bbox/geometry should match committed buffer#2030

Open
kelnos wants to merge 1 commit intoSmithay:masterfrom
kelnos:xwm-bbox-match-buffer
Open

x11: X11Surface bbox/geometry should match committed buffer#2030
kelnos wants to merge 1 commit intoSmithay:masterfrom
kelnos:xwm-bbox-match-buffer

Conversation

@kelnos
Copy link
Copy Markdown
Contributor

@kelnos kelnos commented May 10, 2026

Description

X11Surface::bbox() returns the geometry stored internally by X11Surface, which is based on the last committed configure attempted by the compositor (via configure()). The problem here is that the client is free to reject that size (size increments, min size, max size, etc.).

In these cases, we can mis-render the window (placement or size) if the last configured rect is not the same as the actual committed buffer.

Instead, use the surface/buffer size, and only fall back to X11Surface's geometry if that's not available.

(This used to be a part of #2018 but I decided to split it off since it's not strictly related.)

Checklist

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.44%. Comparing base (e84a4ca) to head (587f573).
⚠️ Report is 77 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2030      +/-   ##
==========================================
- Coverage   18.73%   18.44%   -0.29%     
==========================================
  Files         182      183       +1     
  Lines       28934    29207     +273     
==========================================
- Hits         5421     5388      -33     
- Misses      23513    23819     +306     
Flag Coverage Δ
wlcs-buffer 16.05% <ø> (-0.27%) ⬇️
wlcs-core 15.61% <ø> (-0.37%) ⬇️
wlcs-output 6.94% <ø> (+0.04%) ⬆️
wlcs-pointer-input 17.35% <ø> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

X11Surface::bbox() returns the geometry stored internally by
X11Surface, which is based on the last committed configure attempted by
the compositor (via configure()).  The problem here is that the client
is free to reject that size (size increments, min size, max size, etc.).

In these cases, we can mis-render the window (placement or size) if the
last configured rect is not the same as the actual committed buffer.

Instead, use the surface/buffer size, and only fall back to X11Surface's
geometry if that's not available.
@kelnos kelnos force-pushed the xwm-bbox-match-buffer branch from 587f573 to a50b57c Compare May 10, 2026 20:36
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