mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	handle_layer_shell_surface: Do not crash if seat doesn't have focus
This commit is contained in:
		
							parent
							
								
									1376d36104
								
							
						
					
					
						commit
						47b6fea3fe
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -337,8 +337,11 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
 | 
				
			||||||
		struct sway_seat *seat = input_manager_get_default_seat(input_manager);
 | 
							struct sway_seat *seat = input_manager_get_default_seat(input_manager);
 | 
				
			||||||
		if (seat) {
 | 
							if (seat) {
 | 
				
			||||||
			struct sway_workspace *ws = seat_get_focused_workspace(seat);
 | 
								struct sway_workspace *ws = seat_get_focused_workspace(seat);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (ws != NULL) {
 | 
				
			||||||
				output = ws->output;
 | 
									output = ws->output;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		if (!output) {
 | 
							if (!output) {
 | 
				
			||||||
			if (!sway_assert(root->outputs->length,
 | 
								if (!sway_assert(root->outputs->length,
 | 
				
			||||||
						"cannot auto-assign output for layer")) {
 | 
											"cannot auto-assign output for layer")) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue