oops, just like in dwm we need to remove the padding and border width in
the buttonpress function
This commit is contained in:
parent
f7de91850b
commit
39b166bf17
|
@ -85,9 +85,9 @@ buttonpress(XEvent *e)
|
||||||
// check if we clicked on the prompt or the input
|
// check if we clicked on the prompt or the input
|
||||||
if (ev->x < x + promptw + plw) {
|
if (ev->x < x + promptw + plw) {
|
||||||
click = clickprompt;
|
click = clickprompt;
|
||||||
} else if (ev->x > mw - modeWidth) {
|
} else if (ev->x > mw - modeWidth - 2 * sp - 2 * borderwidth) {
|
||||||
click = clickmode;
|
click = clickmode;
|
||||||
} else if (ev->x > mw - modeWidth - numberWidth) {
|
} else if (ev->x > mw - modeWidth - numberWidth - 2 * sp - 2 * borderwidth) {
|
||||||
click = clicknumber;
|
click = clicknumber;
|
||||||
} else { // actually we clicked on the input
|
} else { // actually we clicked on the input
|
||||||
w = (lines > 0 || !matches) ? mw - x : inputw;
|
w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||||
|
|
2
mouse.h
2
mouse.h
|
@ -23,4 +23,6 @@
|
||||||
static Mouse buttons[] = {
|
static Mouse buttons[] = {
|
||||||
{ clickinput, 0, Button1, clear, {0} },
|
{ clickinput, 0, Button1, clear, {0} },
|
||||||
{ clickprompt, 0, Button1, clear, {0} },
|
{ clickprompt, 0, Button1, clear, {0} },
|
||||||
|
{ clickmode, 0, Button1, switchmode, {0} },
|
||||||
|
{ clicknumber, 0, Button1, viewhist, {0} },
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue