mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	cmd_move_container: Focus a window on the source workspace.
In Sway 0.15, moving a window to another workspace would cause a window on the source workspace to be focused. This restores that behavior, allowing you to quickly move a lot of windows to another workspace.
This commit is contained in:
		
							parent
							
								
									8d99edf787
								
							
						
					
					
						commit
						87fa84df13
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
					@ -90,12 +90,14 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		free(ws_name);
 | 
							free(ws_name);
 | 
				
			||||||
		struct sway_container *old_parent = current->parent;
 | 
							struct sway_container *old_parent = current->parent;
 | 
				
			||||||
		struct sway_container *focus = seat_get_focus_inactive(
 | 
							struct sway_container *destination = seat_get_focus_inactive(
 | 
				
			||||||
				config->handler_context.seat, ws);
 | 
									config->handler_context.seat, ws);
 | 
				
			||||||
		container_move_to(current, focus);
 | 
							container_move_to(current, destination);
 | 
				
			||||||
		seat_set_focus(config->handler_context.seat, old_parent);
 | 
							struct sway_container *focus = seat_get_focus_inactive(
 | 
				
			||||||
 | 
									config->handler_context.seat, old_parent);
 | 
				
			||||||
 | 
							seat_set_focus(config->handler_context.seat, focus);
 | 
				
			||||||
		container_reap_empty(old_parent);
 | 
							container_reap_empty(old_parent);
 | 
				
			||||||
		container_reap_empty(focus->parent);
 | 
							container_reap_empty(destination->parent);
 | 
				
			||||||
		return cmd_results_new(CMD_SUCCESS, NULL, NULL);
 | 
							return cmd_results_new(CMD_SUCCESS, NULL, NULL);
 | 
				
			||||||
	} else if (strcasecmp(argv[1], "to") == 0
 | 
						} else if (strcasecmp(argv[1], "to") == 0
 | 
				
			||||||
			&& strcasecmp(argv[2], "output") == 0) {
 | 
								&& strcasecmp(argv[2], "output") == 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue