summaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorAndrew Guschin <saintruler@gmail.com>2021-09-12 18:29:56 +0400
committerAndrew Guschin <saintruler@gmail.com>2021-09-12 18:29:56 +0400
commit2faaa50b3725bded7b9a858b336a58293f769847 (patch)
treecfedfb63419c29fab21da3dec89c25c80191bcfc /x.c
parentcbb4606edfaf526c89e5574662272e7b0bda05a9 (diff)
Added patches oneclipboard, scrollback-mouse, scrollback-mouse-altscreen
Diffstat (limited to 'x.c')
-rw-r--r--x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/x.c b/x.c
index 083b202..2f0e3fc 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 {
@@ -447,6 +448,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, state) || /* exact or forced */
match(ms->mod, state & ~forcemousemod))) {
ms->func(&(ms->arg));
@@ -674,7 +676,6 @@ setsel(char *str, Time t)
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
selclear();
- clipcopy(NULL);
}
void