mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	swaylock: exit early if unable to inhibit input
This stops the program from going into a spinlock without exiting
This commit is contained in:
		
							parent
							
								
									e33671fd9a
								
							
						
					
					
						commit
						7fffe0a98c
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -925,6 +925,11 @@ int main(int argc, char **argv) {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	zwlr_input_inhibit_manager_v1_get_inhibitor(state.input_inhibit_manager);
 | 
			
		||||
	if (wl_display_roundtrip(state.display) == -1) {
 | 
			
		||||
		wlr_log(WLR_ERROR, "Exiting - failed to inhibit input:"
 | 
			
		||||
				" is another lockscreen already running?");
 | 
			
		||||
		return 2;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (state.zxdg_output_manager) {
 | 
			
		||||
		struct swaylock_surface *surface;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue