Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
mouse shortcuts: allow override for all shortcuts
[st.git]
/
x.c
diff --git
a/x.c
b/x.c
index
2a05a81
..
c967caf
100644
(file)
--- a/
x.c
+++ b/
x.c
@@
-340,7
+340,7
@@
void
mousesel(XEvent *e, int done)
{
int type, seltype = SEL_REGULAR;
mousesel(XEvent *e, int done)
{
int type, seltype = SEL_REGULAR;
- uint state = e->xbutton.state & ~(Button1Mask | force
sel
mod);
+ uint state = e->xbutton.state & ~(Button1Mask | force
mouse
mod);
for (type = 1; type < LEN(selmasks); ++type) {
if (match(selmasks[type], state)) {
for (type = 1; type < LEN(selmasks); ++type) {
if (match(selmasks[type], state)) {
@@
-423,14
+423,14
@@
bpress(XEvent *e)
MouseShortcut *ms;
int snap;
MouseShortcut *ms;
int snap;
- if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
sel
mod)) {
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
mouse
mod)) {
mousereport(e);
return;
}
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
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;
}
ms->func(&(ms->arg));
return;
}
@@
-650,7
+650,7
@@
xsetsel(char *str)
void
brelease(XEvent *e)
{
void
brelease(XEvent *e)
{
- if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
sel
mod)) {
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
mouse
mod)) {
mousereport(e);
return;
}
mousereport(e);
return;
}
@@
-664,7
+664,7
@@
brelease(XEvent *e)
void
bmotion(XEvent *e)
{
void
bmotion(XEvent *e)
{
- if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
sel
mod)) {
+ if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & force
mouse
mod)) {
mousereport(e);
return;
}
mousereport(e);
return;
}