oops, just like in dwm we need to remove the padding and border width in

the buttonpress function
This commit is contained in:
speedie 2023-04-04 01:14:23 +02:00
parent f7de91850b
commit 39b166bf17
2 changed files with 4 additions and 2 deletions

View file

@ -85,9 +85,9 @@ buttonpress(XEvent *e)
// check if we clicked on the prompt or the input
if (ev->x < x + promptw + plw) {
click = clickprompt;
} else if (ev->x > mw - modeWidth) {
} else if (ev->x > mw - modeWidth - 2 * sp - 2 * borderwidth) {
click = clickmode;
} else if (ev->x > mw - modeWidth - numberWidth) {
} else if (ev->x > mw - modeWidth - numberWidth - 2 * sp - 2 * borderwidth) {
click = clicknumber;
} else { // actually we clicked on the input
w = (lines > 0 || !matches) ? mw - x : inputw;

View file

@ -23,4 +23,6 @@
static Mouse buttons[] = {
{ clickinput, 0, Button1, clear, {0} },
{ clickprompt, 0, Button1, clear, {0} },
{ clickmode, 0, Button1, switchmode, {0} },
{ clicknumber, 0, Button1, viewhist, {0} },
};