Repository navigation
fix(linux): stop shadow gutter layout loops on Wayland - #92
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39eda5f08d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75306a011e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Follow-up to #92. Adwaita transitions every decoration property into and out of :backdrop, so the reserved shadow margin grew over ~200 ms. Each frame changed the surface geometry, and a content size requested during the animation was applied against a stale margin: on Weston the composite title-bar test asked for 520x340 and got 560x380. The reserved-margin rule now sets transition: none. With the margin changing at once, Remove() hit the mirror image of the double resize AddGutter() already avoids: GDK shrinks the surface to keep the window geometry, and the explicit resize issued before it was shrunk again by the old margin, losing 2x132 px. Skip that resize on Wayland when GTK owns the gutter, as AddGutter() does. window_controls_test now also checks that a frameless round trip keeps the frame size; it used to grow by the title bar's height each time. The check runs only where GTK draws CSD: on X11 window managers without client-side decorations the border gutter still grows the frame, which predates this change.
Summary
Fix a GTK layout/repaint loop when hiding a Linux window's title bar. GTK rewrites CSD shadow widths during allocation; declaring a second set of widths from the allocation callback keeps scheduling more layout work.
Keep CSD content sizing and frameless behavior consistent with GTK, invalidate fallback declarations across surface/style/scale changes, and add a real GTK regression test.
Evidence
git diff --checkpasses.Run the native regression with:
Merge Danger
Door: Two-way.
Blast Radius: Linux GTK window geometry.
No public API/ABI or persisted-data changes. The live application checks were on GNOME Wayland; KWin/Hyprland and physical mixed-DPI transitions were not tested.