round timeout
round timeout of messages and prevent 0 > timeout > 500 from being rounded to 0
This commit is contained in:
		
							parent
							
								
									16320b0f8d
								
							
						
					
					
						commit
						41401d0985
					
				| @ -236,7 +236,11 @@ notify(DBusMessage *dmsg) { | ||||
| 
 | ||||
| 
 | ||||
|     if(expires > 0) { | ||||
|         expires = expires/1000; | ||||
|         /* do some rounding */ | ||||
|         expires = (expires+500)/1000; | ||||
|         if(expires < 1) { | ||||
|             expires = 1; | ||||
|         } | ||||
|     } | ||||
|     msgqueue = append(msgqueue, msg, expires, urgency, fgcolor, bgcolor); | ||||
|     drawmsg(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse