mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	sway/commands: Return error if container is not in scratchpad
This commit is contained in:
		
							parent
							
								
									2f5b3c0999
								
							
						
					
					
						commit
						3a49409dae
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -118,10 +118,10 @@ struct cmd_results *cmd_scratchpad(int argc, char **argv) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// If using criteria, this command is executed for every container which
 | 
							// If using criteria, this command is executed for every container which
 | 
				
			||||||
		// matches the criteria. If this container isn't in the scratchpad,
 | 
							// matches the criteria. If this container isn't in the scratchpad,
 | 
				
			||||||
		// we'll just silently return a success. The same is true if the
 | 
							// we'll return an error. The same is true if the
 | 
				
			||||||
		// overridden node is not a container.
 | 
							// overridden node is not a container.
 | 
				
			||||||
		if (!con || !con->scratchpad) {
 | 
							if (!con || !con->scratchpad) {
 | 
				
			||||||
			return cmd_results_new(CMD_SUCCESS, NULL);
 | 
								return cmd_results_new(CMD_INVALID, "Container is not in scratchpad.");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		scratchpad_toggle_container(con);
 | 
							scratchpad_toggle_container(con);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue