account for padding on mouse click calculation
this should hopefully fix gihub issue #84
This commit is contained in:
parent
f2075a3409
commit
414d3d056a
4
dunst.c
4
dunst.c
@ -927,7 +927,9 @@ void handle_mouse_click(XEvent ev)
|
|||||||
notification *n = NULL;
|
notification *n = NULL;
|
||||||
for (n_queue *iter = displayed; iter; iter = iter->next) {
|
for (n_queue *iter = displayed; iter; iter = iter->next) {
|
||||||
n = iter->n;
|
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)
|
if (ev.xbutton.y > y && ev.xbutton.y < y + height)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user