mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	Actually move clients away from a disabled mon
When using wlr-randr every monitor's configuration is reevaluated, so it must check which monitors are actually being disabled. The only way to correctly do that is to compare the names.
This commit is contained in:
		
							parent
							
								
									874a4df389
								
							
						
					
					
						commit
						4deeddceff
					
				
					 1 changed files with 3 additions and 14 deletions
				
			
		
							
								
								
									
										17
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										17
									
								
								dwl.c
									
										
									
									
									
								
							| 
						 | 
					@ -1466,21 +1466,10 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test)
 | 
				
			||||||
		Monitor *m;
 | 
							Monitor *m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		wlr_output_enable(wlr_output, config_head->state.enabled);
 | 
							wlr_output_enable(wlr_output, config_head->state.enabled);
 | 
				
			||||||
		if (!wlr_output->enabled) {
 | 
							if (!config_head->state.enabled)
 | 
				
			||||||
			wl_list_for_each(m, &mons, link) {
 | 
								wl_list_for_each(m, &mons, link)
 | 
				
			||||||
				if (m->wlr_output == wlr_output) {
 | 
									if (m->wlr_output->name == wlr_output->name)
 | 
				
			||||||
					wlr_output_set_mode(m->wlr_output, wlr_output_preferred_mode(m->wlr_output));
 | 
					 | 
				
			||||||
					break;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			wl_list_for_each(m, &mons, link) {
 | 
					 | 
				
			||||||
				if (m->wlr_output == wlr_output) {
 | 
					 | 
				
			||||||
					closemon(m);
 | 
										closemon(m);
 | 
				
			||||||
					break;
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (config_head->state.enabled) {
 | 
							if (config_head->state.enabled) {
 | 
				
			||||||
			if (config_head->state.mode)
 | 
								if (config_head->state.mode)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue