Fix scrolling

This commit is contained in:
Oshgnacknak 2022-09-13 01:36:48 +02:00
parent 211fed6612
commit ef78ea5975
Signed by: Oshgnacknak
GPG key ID: 8CB7375654585956
2 changed files with 4 additions and 14 deletions

View file

@ -181,18 +181,16 @@ static uint forcemousemod = ShiftMask;
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, kscrollup, {.i = 5} },
{ ShiftMask, Button5, kscrolldown, {.i = 5} },
{ XK_NO_MOD, Button4, kscrollup, {.i = 1} },
{ XK_NO_MOD, Button5, kscrolldown, {.i = 1} },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
MouseKey mkeys[] = {
/* button mask function argument */
{ Button4, XK_NO_MOD, kscrollup, {.i = 1} },
{ Button5, XK_NO_MOD, kscrolldown, {.i = 1} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)

8
x.c
View file

@ -496,14 +496,6 @@ bpress(XEvent *e)
}
}
for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
if (e->xbutton.button == mk->b
&& match(mk->mask, e->xbutton.state)) {
mk->func(&mk->arg);
return;
}
}
if (btn == Button1) {
/*
* If the user clicks below predefined timeouts specific