From 43b9c45cd89e977a7fb7b4a4e028f7620475d5ce Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 26 Nov 2017 20:44:56 +0100 Subject: [PATCH] Clearify structures in dunst:run --- src/dunst.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dunst.c b/src/dunst.c index 5d55467..4b3e3f1 100644 --- a/src/dunst.c +++ b/src/dunst.c @@ -60,7 +60,7 @@ gboolean run(void *data) timeout_cnt--; } - if (queues_length_displayed() > 0 && !xctx.visible) { + if (!xctx.visible && queues_length_displayed() > 0) { x_win_show(); } @@ -86,8 +86,12 @@ gboolean run(void *data) } } - /* always return false to delete timers */ - return false; + /* If the execution got triggered by g_timeout_add, + * we have to remove the timeout (which is actually a + * recurring interval), as we have set a new one + * by ourselves. + */ + return G_SOURCE_REMOVE; } gboolean pause_signal(gpointer data)