mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix using last output config if none matched
This commit is contained in:
		
							parent
							
								
									7a1c8c2939
								
							
						
					
					
						commit
						bf5244b49c
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -82,13 +82,15 @@ swayc_t *new_output(wlc_handle handle) {
 | 
				
			||||||
	struct output_config *oc = NULL;
 | 
						struct output_config *oc = NULL;
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
	for (i = 0; i < config->output_configs->length; ++i) {
 | 
						for (i = 0; i < config->output_configs->length; ++i) {
 | 
				
			||||||
		oc = config->output_configs->items[i];
 | 
							struct output_config *cur = config->output_configs->items[i];
 | 
				
			||||||
		if (strcasecmp(name, oc->name) == 0) {
 | 
							if (strcasecmp(name, cur->name) == 0) {
 | 
				
			||||||
			sway_log(L_DEBUG, "Matched output config for %s", name);
 | 
								sway_log(L_DEBUG, "Matched output config for %s", name);
 | 
				
			||||||
 | 
								oc = cur;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (strcasecmp("*", oc->name) == 0) {
 | 
							if (strcasecmp("*", cur->name) == 0) {
 | 
				
			||||||
			sway_log(L_DEBUG, "Matched wildcard output config for %s", name);
 | 
								sway_log(L_DEBUG, "Matched wildcard output config for %s", name);
 | 
				
			||||||
 | 
								oc = cur;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue