mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/action.c: fix MoveToOutput action by renaming 'name' argument
We were using the argument name 'name' before which is already used by the action itself: `<action name="MoveToOutput" name="HDMI-A-1" />` Change the argument name to "output" which also matches the `FocusOutput` action. Fixes: #1589 Reported-by: @bnason (thanks!)
This commit is contained in:
		
							parent
							
								
									bcf2d7e091
								
							
						
					
					
						commit
						983ca66d07
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -383,7 +383,7 @@ action_arg_from_xml_node(struct action *action, const char *nodename, const char
 | 
			
		|||
		}
 | 
			
		||||
		break;
 | 
			
		||||
	case ACTION_TYPE_MOVE_TO_OUTPUT:
 | 
			
		||||
		if (!strcmp(argument, "name")) {
 | 
			
		||||
		if (!strcmp(argument, "output")) {
 | 
			
		||||
			action_arg_add_str(action, argument, content);
 | 
			
		||||
			goto cleanup;
 | 
			
		||||
		}
 | 
			
		||||
| 
						 | 
				
			
			@ -921,10 +921,10 @@ actions_run(struct view *activator, struct server *server,
 | 
			
		|||
			if (!view) {
 | 
			
		||||
				break;
 | 
			
		||||
			}
 | 
			
		||||
			const char *name = action_get_str(action, "name", NULL);
 | 
			
		||||
			const char *output_name = action_get_str(action, "output", NULL);
 | 
			
		||||
			struct output *target = NULL;
 | 
			
		||||
			if (name) {
 | 
			
		||||
				target = output_from_name(view->server, name);
 | 
			
		||||
			if (output_name) {
 | 
			
		||||
				target = output_from_name(view->server, output_name);
 | 
			
		||||
			} else {
 | 
			
		||||
				/* Config parsing makes sure that direction is a valid direction */
 | 
			
		||||
				enum view_edge edge = action_get_int(action, "direction", 0);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue