mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Reset the alerts timer always on activity, from Thomas Adam.
This commit is contained in:
		
							
								
								
									
										6
									
								
								alerts.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								alerts.c
									
									
									
									
									
								
							@@ -126,6 +126,9 @@ 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);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	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);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -139,9 +142,6 @@ alerts_queue(struct window *w, int flags)
 | 
				
			|||||||
		event_once(-1, EV_TIMEOUT, alerts_callback, NULL, NULL);
 | 
							event_once(-1, EV_TIMEOUT, alerts_callback, NULL, NULL);
 | 
				
			||||||
		alerts_fired = 1;
 | 
							alerts_fired = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (flags & WINDOW_ACTIVITY)
 | 
					 | 
				
			||||||
		alerts_reset(w);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user