Fix incorrect handling of 'do_action, close' mouse action

Fixes #778
This commit is contained in:
Nikos Tsipinakis 2020-12-01 13:41:13 +02:00
parent f866f8e4e7
commit 732227eff5

View File

@ -449,10 +449,17 @@ static void x_handle_click(XEvent ev)
} }
if (n) { if (n) {
if (act == MOUSE_CLOSE_CURRENT) if (act == MOUSE_CLOSE_CURRENT) {
queues_notification_close(n, REASON_USER); // We cannot call
else // 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); notification_do_action(n);
}
} }
} }
} }