mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #903 from RyanDwyer/fix-swaybar-output
Fix swaybar when running on named outputs.
This commit is contained in:
		
						commit
						75f82808e2
					
				
					 3 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
					@ -936,9 +936,6 @@ void apply_output_config(struct output_config *oc, swayc_t *output) {
 | 
				
			||||||
			execvp(cmd[0], cmd);
 | 
								execvp(cmd[0], cmd);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	// reload swaybars
 | 
					 | 
				
			||||||
	load_swaybars();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
char *do_var_replacement(char *str) {
 | 
					char *do_var_replacement(char *str) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,6 +156,7 @@ swayc_t *new_output(wlc_handle handle) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	apply_output_config(oc, output);
 | 
						apply_output_config(oc, output);
 | 
				
			||||||
	add_child(&root_container, output);
 | 
						add_child(&root_container, output);
 | 
				
			||||||
 | 
						load_swaybars();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Create workspace
 | 
						// Create workspace
 | 
				
			||||||
	char *ws_name = NULL;
 | 
						char *ws_name = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -278,7 +278,7 @@ void ipc_bar_init(struct bar *bar, const char *bar_id) {
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			int j = 0;
 | 
								int j = 0;
 | 
				
			||||||
			for (j = 0; j < bar->config->outputs->length; ++j) {
 | 
								for (j = 0; j < bar->config->outputs->length; ++j) {
 | 
				
			||||||
				const char *conf_name = bar->config->outputs->items[i];
 | 
									const char *conf_name = bar->config->outputs->items[j];
 | 
				
			||||||
				if (strcasecmp(name, conf_name) == 0) {
 | 
									if (strcasecmp(name, conf_name) == 0) {
 | 
				
			||||||
					use_output = true;
 | 
										use_output = true;
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue