mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #2940 from RyanDwyer/fix-swaybar-crash
Fix swaybar crash when there's no status_command
This commit is contained in:
		
						commit
						970501f05e
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
					@ -155,10 +155,12 @@ bool determine_bar_visibility(struct swaybar *bar, bool moving_layer) {
 | 
				
			||||||
	if (visible != bar->visible) {
 | 
						if (visible != bar->visible) {
 | 
				
			||||||
		bar->visible = visible;
 | 
							bar->visible = visible;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (bar->status) {
 | 
				
			||||||
			wlr_log(WLR_DEBUG, "Sending %s signal to status command",
 | 
								wlr_log(WLR_DEBUG, "Sending %s signal to status command",
 | 
				
			||||||
					visible ? "cont" : "stop");
 | 
										visible ? "cont" : "stop");
 | 
				
			||||||
		kill(bar->status->pid,
 | 
								kill(bar->status->pid, visible ?
 | 
				
			||||||
				visible ? bar->status->cont_signal : bar->status->stop_signal);
 | 
										bar->status->cont_signal : bar->status->stop_signal);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return visible;
 | 
						return visible;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue