Fix draw being called twice when mapping the window
This commit is contained in:
		
							parent
							
								
									76fecedfd8
								
							
						
					
					
						commit
						81fae350c9
					
				
							
								
								
									
										10
									
								
								src/dunst.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/dunst.c
									
									
									
									
									
								
							| @ -51,8 +51,12 @@ static gboolean run(void *data) | ||||
| 
 | ||||
|         static gint64 next_timeout = 0; | ||||
| 
 | ||||
|         if (!x_win_visible(win) && queues_length_displayed() > 0) { | ||||
|         // Call draw before showing the window to avoid flickering
 | ||||
|         if (queues_length_displayed() > 0) { | ||||
|                 draw(); | ||||
|         } | ||||
| 
 | ||||
|         if (!x_win_visible(win) && queues_length_displayed() > 0) { | ||||
|                 x_win_show(win); | ||||
|         } | ||||
| 
 | ||||
| @ -60,10 +64,6 @@ static gboolean run(void *data) | ||||
|                 x_win_hide(win); | ||||
|         } | ||||
| 
 | ||||
|         if (x_win_visible(win)) { | ||||
|                 draw(); | ||||
|         } | ||||
| 
 | ||||
|         if (x_win_visible(win)) { | ||||
|                 gint64 now = time_monotonic_now(); | ||||
|                 gint64 sleep = queues_get_next_datachange(now); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikos Tsipinakis
						Nikos Tsipinakis