X-Git-Url: https://git.danieliu.xyz/?p=st.git;a=blobdiff_plain;f=x.c;h=c967caf2cf0ce3a548bc36414bb6410ae75fb3a4;hp=2a05a81435f9cdd6de5cb641edace1bd8c98c8be;hb=b6d280de6df30167ce9cf30fadefc362e77729e7;hpb=ba7f4d69af62d20e13fea78a408095e017410651 diff --git a/x.c b/x.c index 2a05a81..c967caf 100644 --- a/x.c +++ b/x.c @@ -340,7 +340,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)) { @@ -423,14 +423,14 @@ bpress(XEvent *e) MouseShortcut *ms; int snap; - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { mousereport(e); return; } 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; } @@ -650,7 +650,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; } @@ -664,7 +664,7 @@ brelease(XEvent *e) void bmotion(XEvent *e) { - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) { + if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { mousereport(e); return; }