mouse shortcuts: allow override for all shortcuts (7729e7)

This commit is contained in:
bakkeby 2020-03-24 14:08:08 +01:00
parent 584f3928ad
commit ed7837a816
2 changed files with 13 additions and 13 deletions

12
x.c
View file

@ -390,7 +390,7 @@ void
mousesel(XEvent *e, int done)
{
int type, seltype = SEL_REGULAR;
uint state = e->xbutton.state & ~(Button1Mask | forceselmod);
uint state = e->xbutton.state & ~(Button1Mask | forcemousemod);
for (type = 1; type < LEN(selmasks); ++type) {
if (match(selmasks[type], state)) {
@ -476,7 +476,7 @@ bpress(XEvent *e)
#endif // SCROLLBACK_MOUSE_PATCH / SCROLLBACK_MOUSE_ALTSCREEN_PATCH
int snap;
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
mousereport(e);
return;
}
@ -485,8 +485,8 @@ bpress(XEvent *e)
if (tisaltscr())
#endif // SCROLLBACK_MOUSE_ALTSCREEN_PATCH
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
if (e->xbutton.button == ms->button
&& match(ms->mod, e->xbutton.state)) {
if (e->xbutton.button == ms->button &&
match(ms->mod, e->xbutton.state & ~forcemousemod)) {
ms->func(&(ms->arg));
return;
}
@ -720,7 +720,7 @@ xsetsel(char *str)
void
brelease(XEvent *e)
{
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
mousereport(e);
return;
}
@ -751,7 +751,7 @@ bmotion(XEvent *e)
}
#endif // HIDECURSOR_PATCH
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) {
mousereport(e);
return;
}