mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Always reset the alerts timer so it works even if activity and silence
are enabled on the same window.
This commit is contained in:
		
							
								
								
									
										4
									
								
								alerts.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								alerts.c
									
									
									
									
									
								
							@@ -45,7 +45,6 @@ alerts_timer(__unused int fd, __unused short events, void *arg)
 | 
				
			|||||||
	struct window	*w = arg;
 | 
						struct window	*w = arg;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log_debug("@%u alerts timer expired", w->id);
 | 
						log_debug("@%u alerts timer expired", w->id);
 | 
				
			||||||
	alerts_reset(w);
 | 
					 | 
				
			||||||
	alerts_queue(w, WINDOW_SILENCE);
 | 
						alerts_queue(w, WINDOW_SILENCE);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -132,8 +131,7 @@ alerts_reset(struct window *w)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
alerts_queue(struct window *w, int flags)
 | 
					alerts_queue(struct window *w, int flags)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (w->flags & WINDOW_ACTIVITY)
 | 
						alerts_reset(w);
 | 
				
			||||||
		alerts_reset(w);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!event_initialized(&w->alerts_timer))
 | 
						if (!event_initialized(&w->alerts_timer))
 | 
				
			||||||
		evtimer_set(&w->alerts_timer, alerts_timer, w);
 | 
							evtimer_set(&w->alerts_timer, alerts_timer, w);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user