From 414d3d056afeadf7ae517242d81d0478e385c944 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Fri, 28 Dec 2012 21:23:44 +0100 Subject: [PATCH] account for padding on mouse click calculation this should hopefully fix gihub issue #84 --- dunst.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dunst.c b/dunst.c index 17b7bb2..c4177d4 100644 --- a/dunst.c +++ b/dunst.c @@ -927,7 +927,9 @@ void handle_mouse_click(XEvent ev) notification *n = NULL; for (n_queue *iter = displayed; iter; iter = iter->next) { n = iter->n; - int height = MAX(font_h, line_height) * n->line_count; + int line_h = MAX(font_h, line_height); + int lines = line_h * n->line_count; + int height = lines + (2 * h_padding); if (ev.xbutton.y > y && ev.xbutton.y < y + height) break; else