mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									06a13203dd
								
							
						
					
					
						commit
						33127c545b
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -472,6 +472,7 @@ bool wlr_output_commit(struct wlr_output *output) {
 | 
				
			||||||
	wlr_signal_emit_safe(&output->events.precommit, &event);
 | 
						wlr_signal_emit_safe(&output->events.precommit, &event);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!output->impl->commit(output)) {
 | 
						if (!output->impl->commit(output)) {
 | 
				
			||||||
 | 
							output_state_clear(&output->pending);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue