parent
							
								
									a098b9476f
								
							
						
					
					
						commit
						fb8eafe3fa
					
				| @ -359,6 +359,8 @@ int notification_init(notification * n, int id) | |||||||
| 
 | 
 | ||||||
|         n->redisplayed = false; |         n->redisplayed = false; | ||||||
| 
 | 
 | ||||||
|  |         n->first_render = true; | ||||||
|  | 
 | ||||||
|         if (id == 0) { |         if (id == 0) { | ||||||
|                 n->id = ++next_notification_id; |                 n->id = ++next_notification_id; | ||||||
|         } else { |         } else { | ||||||
|  | |||||||
| @ -31,6 +31,7 @@ typedef struct _notification { | |||||||
|         int dup_count; |         int dup_count; | ||||||
|         int displayed_height; |         int displayed_height; | ||||||
|         const char *color_strings[2]; |         const char *color_strings[2]; | ||||||
|  |         bool first_render; | ||||||
| 
 | 
 | ||||||
|         int progress;           /* percentage + 1, 0 to hide */ |         int progress;           /* percentage + 1, 0 to hide */ | ||||||
|         int line_count; |         int line_count; | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								x.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								x.c
									
									
									
									
									
								
							| @ -301,7 +301,9 @@ static colored_layout *r_create_layout_from_notification(cairo_t *c, notificatio | |||||||
|                 cl->text = NULL; |                 cl->text = NULL; | ||||||
|                 cl->attr = NULL; |                 cl->attr = NULL; | ||||||
|                 pango_layout_set_text(cl->l, n->text_to_render, -1); |                 pango_layout_set_text(cl->l, n->text_to_render, -1); | ||||||
|  |                 if (n->first_render) { | ||||||
|                         printf("Error parsing markup: %s\n", err->message); |                         printf("Error parsing markup: %s\n", err->message); | ||||||
|  |                 } | ||||||
|                 g_error_free(err); |                 g_error_free(err); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -309,6 +311,7 @@ static colored_layout *r_create_layout_from_notification(cairo_t *c, notificatio | |||||||
|         pango_layout_get_pixel_size(cl->l, NULL, &(n->displayed_height)); |         pango_layout_get_pixel_size(cl->l, NULL, &(n->displayed_height)); | ||||||
|         n->displayed_height += 2 * settings.padding; |         n->displayed_height += 2 * settings.padding; | ||||||
| 
 | 
 | ||||||
|  |         n->first_render = false; | ||||||
|         return cl; |         return cl; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse