diff options
| author | srdusr <[email protected]> | 2026-07-26 23:02:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-07-26 23:02:00 +0200 |
| commit | 492aa5b554ddc389bb2f233c60ea503b3dbda990 (patch) | |
| tree | f483a24188664287237127a1c04ad2f5ff2af414 /Cargo.toml | |
| parent | 8ed79c21a53e10c29ea35b9a605250ea18f191cf (diff) | |
| download | srdwm-492aa5b554ddc389bb2f233c60ea503b3dbda990.tar.gz srdwm-492aa5b554ddc389bb2f233c60ea503b3dbda990.zip | |
Draw a window's content from the same rect as the frame around it
Reported live: "resizing shrinks/grows only the right side", and "the
titlebar seems separate when resizing, it doesn't size at the same time".
Both are one bug. Every decoration - border strips, titlebar, shadow --
is drawn from `frame`: the client's last committed size, anchored to
whichever edge the drag is not holding. The content was drawn from `geom`:
this compositor's live drag target, which moves on the same frame the
pointer does. A client is always at least one commit behind a drag, so for
that whole interval the two rects disagree, and the window is drawn as two
pieces that move independently - the stale buffer sliding left with the
pointer, carrying its old width, while the border it belongs in stays where
the committed size puts it. Dragging a left edge therefore looked like it
moved the right one.
All three content paths now position from `frame` (both udev render loops
and the winit one). Outside a resize this changes nothing at all:
`committed_frame` only ever corrects the far edge, so `frame.x`/`frame.y`
and `geom.x`/`geom.y` are the same value.
Measured in a nested compositor, driving a real left-edge drag with the
virtual-pointer tool and sampling both the model's target rect and the
rendered pixels at the same moments: the content sits exactly one border
width inside the border on both sides in every frame, the right edge holds
at 830 throughout, and the left edge tracks the pointer (305, then 405).
The earlier decorated-window run measured the same thing for the titlebar:
its left edge moved with the window, its right edge did not move at all.
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions