aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-06-04 18:18:02 -0400
committerSimon Ser <contact@emersion.fr>2022-06-05 07:41:11 +0000
commit808e660291309ad36581356cb7a3931657d228af (patch)
treeaeb0528c806a4dc610fca210b8fc59174538dd79
parentc2952411d388c09fa4e90aca3c27e5d2e74bd413 (diff)
wlr_output_commit_state: Make sure to clear the back buffer
Fixes: #3445
-rw-r--r--types/output/output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/types/output/output.c b/types/output/output.c
index 6bcb2b87..c69b517f 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -706,12 +706,14 @@ bool wlr_output_commit_state(struct wlr_output *output,
const struct wlr_output_state *state) {
if (!output_basic_test(output, state)) {
wlr_log(WLR_ERROR, "Basic output test failed for %s", output->name);
+ output_clear_back_buffer(output);
return false;
}
// Duplicate the state because we might mutate it in output_ensure_buffer
struct wlr_output_state pending = *state;
if (!output_ensure_buffer(output, &pending)) {
+ output_clear_back_buffer(output);
return false;
}