From 30c5c63d7255a4dd5f0052cfdd3847806fdaac10 Mon Sep 17 00:00:00 2001 From: progandy Date: Mon, 11 Mar 2013 00:32:00 +0100 Subject: [PATCH 1/2] menu.c: fix problems with trailing whitespace in actions --- menu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/menu.c b/menu.c index 889a3ce..3362af9 100644 --- a/menu.c +++ b/menu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "dunst.h" #include "utils.h" @@ -136,6 +137,7 @@ void invoke_action(const char *action) */ void dispatch_menu_result(const char *input) { + g_strstrip(input); switch (input[0]) { case '#': invoke_action(input + 1); From 99feeea84b92b8bc463bcc19804f95da2dd0af98 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sun, 10 Mar 2013 23:55:20 +0100 Subject: [PATCH 2/2] fix segfault --- x.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/x.c b/x.c index 5a104fb..2ad74d3 100644 --- a/x.c +++ b/x.c @@ -465,7 +465,10 @@ static void setopacity(Window win, unsigned long opacity) */ gboolean x_mainloop_fd_prepare(GSource * source, gint * timeout) { - *timeout = -1; + if (timeout) + *timeout = -1; + else + g_print("BUG: x_mainloop_fd_prepare: timeout == NULL\n"); return false; } @@ -510,9 +513,9 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, 0) == settings.close_ks.sym && settings.close_ks.mask == ev.xkey.state) { if (displayed) { - notification_close - (g_queue_peek_head_link(displayed)-> - data, 2); + notification *n = g_queue_peek_head(displayed); + if (n) + notification_close(n, 2); } } if (settings.history_ks.str