Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix: overview scale survives client commits (Firefox pop-to-full-size)
wlroots' scene-surface commit listener resets a committed buffer's dest
size and opaque region to the surface's natural extent. The
last_applied_scale short-circuit in scale_only_render_finish then skipped
the per-frame reapply (output.rs render_and_commit) because the scale
itself hadn't changed, so any client repainting in overview — browser
animations, caret blink — popped back to full size and stayed there until
the next camera move. Drop the short-circuit: the pass runs only on frames
that will render, and every setter in it is change-checked, so an
already-correct tree produces no damage.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/server/window.rs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/server/window.rs b/src/server/window.rs
index 14bc19e..97ecaf3 100644
--- a/src/server/window.rs
+++ b/src/server/window.rs
@@ -2368,10 +2368,14 @@ impl Window {
return;
}
- if self.scale == self.last_applied_scale {
- return;
- }
-
+ // No last_applied_scale short-circuit here: wlroots' scene-surface
+ // commit listener resets a committed buffer's dest size and opaque
+ // region to the surface's natural extent, so any client repainting
+ // while scaled (browser animations, caret blink) pops back to full
+ // size even though the cached scale says nothing changed. This runs
+ // per rendered frame (output.rs render_and_commit), after commits and
+ // before build_state, and every setter below is change-checked — an
+ // already-correct tree produces no damage.
self.last_applied_scale = self.scale;
struct ScaleData {