From 28ab32d47e7edad2f5124b33eb8c76234bf26b56 Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: Thu, 5 Jun 2014 13:46:32 +0200 Subject: [PATCH 1/1] Do not delete notifications if they could not be displayed. Change-Id: I1be3c02f848cc9c706dbbcc9a1f83998ec172059 Signed-off-by: Manuel Bachmann --- notification_display_service.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/notification_display_service.c b/notification_display_service.c index a1b56f1..4550f44 100644 --- a/notification_display_service.c +++ b/notification_display_service.c @@ -46,8 +46,15 @@ void display_notifications () wlmessage_set_icon (wlmessage, image_path); wlmessage_set_message (wlmessage, content); wlmessage_add_button (wlmessage, 0, "Ok"); - wlmessage_show (wlmessage, NULL); + if (wlmessage_show (wlmessage, NULL) < 0) { + wlmessage_destroy (wlmessage); + return; + } wlmessage_destroy (wlmessage); +# else + fprintf(stderr, "\nNew Notification : %s\n", title); + fprintf(stderr, "Icon : %s\n", image_path); + fprintf(stderr, "Message : %s\n", content); # endif get_list = notification_list_remove(get_list, noti); -- 2.7.4