From 732227eff5df7afa3f44bc7f2cc661b22b4e3f0b Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Tue, 1 Dec 2020 13:41:13 +0200 Subject: [PATCH] Fix incorrect handling of 'do_action, close' mouse action Fixes #778 --- src/x11/x.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/x11/x.c b/src/x11/x.c index 461526a..5136d4b 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -449,10 +449,17 @@ static void x_handle_click(XEvent ev) } if (n) { - if (act == MOUSE_CLOSE_CURRENT) - queues_notification_close(n, REASON_USER); - else + if (act == MOUSE_CLOSE_CURRENT) { + // We cannot call + // queues_close_notification here as + // the do_action runs in a separate + // thread, so force expire the + // notification instead + n->timeout = 1; + n->start -= 1; + } else { notification_do_action(n); + } } } }