aboutsummarylogtreecommitdiffstats
path: root/x.c
diff options
context:
space:
mode:
authorMaxim Kochurov2020-01-28 23:37:25 +0300
committerMaxim Kochurov2020-01-28 23:37:25 +0300
commite84d8ca1b83cb6fd1729135ef527074ebdef9c51 (patch)
tree2b266b177201bb0b4d823773ccff9b237b3d3eea /x.c
parent1fc60e888f0d701c0a54d12bd05ca76004436b17 (diff)
downloadaur-e84d8ca1b83cb6fd1729135ef527074ebdef9c51.tar.gz
scrolling
Diffstat (limited to 'x.c')
-rw-r--r--x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/x.c b/x.c
index e000894b33a8..2e95ee8d317d 100644
--- a/x.c
+++ b/x.c
@@ -34,6 +34,7 @@ typedef struct {
void (*func)(const Arg *);
const Arg arg;
uint release;
+ int altscrn; /* 0: don't care, -1: not alt screen, 1: alt screen */
} MouseShortcut;
typedef struct {
@@ -426,6 +427,7 @@ mouseaction(XEvent *e, uint release)
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
if (ms->release == release &&
ms->button == e->xbutton.button &&
+ (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) &&
(match(ms->mod, e->xbutton.state) || /* exact or forced */
match(ms->mod, e->xbutton.state & ~forcemousemod))) {
ms->func(&(ms->arg));