From 988a4623ab9250701f3d95d8fe1fd4f4f4321c2f Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 25 Jul 2021 22:22:46 +0200 Subject: [PATCH] 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(); }