From b37126608a460812823e11856eb9e3cf79747ca4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 1 Dec 2025 18:33:31 -0700 Subject: [PATCH] clipboard fix --- x.c | 1 + x.c.orig | 2 ++ 2 files changed, 3 insertions(+) diff --git a/x.c b/x.c index fc717e9..1a70718 100644 --- a/x.c +++ b/x.c @@ -690,6 +690,7 @@ 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 diff --git a/x.c.orig b/x.c.orig index f8fa6cf..fc717e9 100644 --- a/x.c.orig +++ b/x.c.orig @@ -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 { @@ -457,6 +458,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));