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.
This commit is contained in:
Isaac Freund 2021-07-25 22:22:46 +02:00
parent eab9c0901a
commit 988a4623ab
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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; const self_tags_changed = view.pending.tags != view.current.tags;
view.current = view.pending; view.current = view.pending;
if (self_tags_changed) view.output.sendViewTags(); 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(); view.output.damage.addWhole();
server.input_manager.updateCursorState(); server.input_manager.updateCursorState();
} }