mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	focus: Fix moving last workspace.
If there's only one workspace on an output and it's moved to a different output then active workspace will be NULL.
This commit is contained in:
		
							parent
							
								
									5f9909c9dd
								
							
						
					
					
						commit
						18a7afa1b3
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -96,7 +96,10 @@ bool set_focused_container(swayc_t *c) {
 | 
			
		|||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
	swayc_t *active_ws = swayc_active_workspace();
 | 
			
		||||
	int active_ws_child_count = active_ws->children->length + active_ws->floating->length;
 | 
			
		||||
	int active_ws_child_count = 0;
 | 
			
		||||
	if (active_ws) {
 | 
			
		||||
		active_ws_child_count = active_ws->children->length + active_ws->floating->length;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue