diff options
| author | Simon Ser <contact@emersion.fr> | 2019-06-16 10:19:34 +0300 | 
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2019-06-16 10:51:49 -0400 | 
| commit | 33127c545be731e373a9e4ccd38cd03da479c10f (patch) | |
| tree | 6a0b5d7de7309bdfc01c323e13fe5f888834922d | |
| parent | 06a13203ddb9c085b1e514b09b424c19f058fd8d (diff) | |
| download | wlroots-33127c545be731e373a9e4ccd38cd03da479c10f.tar.xz | |
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.
| -rw-r--r-- | types/wlr_output.c | 1 | 
1 files changed, 1 insertions, 0 deletions
| 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;  	} | 
