Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
view: ensure saved buffers are always dropped
Currently if a view is moved from layout to fullscreen while a
transaction involving that view is in progress the saved buffers are not
dropped, which causes stale state to be rendered.
river/XdgToplevel.zig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/river/XdgToplevel.zig b/river/XdgToplevel.zig
index 45bfcc8..bd55969 100644
--- a/river/XdgToplevel.zig
+++ b/river/XdgToplevel.zig
@@ -272,6 +272,11 @@ fn handleCommit(listener: *wl.Listener(*wlr.Surface), surface: *wlr.Surface) voi
const self_tags_changed = view.pending.tags != view.current.tags;
view.current = view.pending;
if (self_tags_changed) view.output.sendViewTags();
+
+ // This is necessary if this view was part of a transaction that didn't get completed
+ // before some change occured that caused shouldTrackConfigure() to return false.
+ view.dropSavedBuffers();
+
view.output.damage.addWhole();
server.input_manager.updateCursorState();
}