From 33127c545be731e373a9e4ccd38cd03da479c10f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 16 Jun 2019 10:19:34 +0300 Subject: output: reset the pending state on failed commit It can be surprising for callers to stash pending changes, commit, get a failure, then set some other pending changes, commit again, and get another failure because of the previously-pending changes. Instead, make commit reset the pending state on failure. --- types/wlr_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/types/wlr_output.c b/types/wlr_output.c index c39b07b3..6926ab60 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -472,6 +472,7 @@ bool wlr_output_commit(struct wlr_output *output) { wlr_signal_emit_safe(&output->events.precommit, &event); if (!output->impl->commit(output)) { + output_state_clear(&output->pending); return false; } -- cgit v1.2.3