mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	move scratchpad: hide visible scratchpad container
This makes it so running `move [to] scratchpad` on a container already in the scratchpad does not return an error. To match i3's behavior, a visible scratchpad container will be hidden and a hidden scratchpad container will be treated as a noop.
This commit is contained in:
		
							parent
							
								
									16ddd00102
								
							
						
					
					
						commit
						7252ca09a7
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -854,11 +854,11 @@ static struct cmd_results *cmd_move_to_scratchpad(void) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (con->scratchpad) {
 | 
						if (!con->scratchpad) {
 | 
				
			||||||
		return cmd_results_new(CMD_INVALID,
 | 
							root_scratchpad_add_container(con);
 | 
				
			||||||
				"Container is already in the scratchpad");
 | 
						} else if (con->workspace) {
 | 
				
			||||||
 | 
							root_scratchpad_hide(con);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	root_scratchpad_add_container(con);
 | 
					 | 
				
			||||||
	return cmd_results_new(CMD_SUCCESS, NULL);
 | 
						return cmd_results_new(CMD_SUCCESS, NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue