From 47932ea163e2b4082bd5e5527c0d8b4362fb05fc Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Sat, 21 Nov 2020 10:49:43 -0800 Subject: [PATCH] Adding mouse select to clipboard copy patch --- patches/README.md | 1 + patches/st-clipboard-0.8.3.diff | 12 ++++++++++++ x.c | 1 + 3 files changed, 14 insertions(+) create mode 100644 patches/st-clipboard-0.8.3.diff diff --git a/patches/README.md b/patches/README.md index d26da74..b932c97 100644 --- a/patches/README.md +++ b/patches/README.md @@ -2,3 +2,4 @@ 1. http://st.suckless.org/patches/copyurl/st-copyurl-20190202-0.8.1.diff 1. http://st.suckless.org/patches/alpha/st-alpha-0.8.2.diff +1. http://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff diff --git a/patches/st-clipboard-0.8.3.diff b/patches/st-clipboard-0.8.3.diff new file mode 100644 index 0000000..c1e0e9e --- /dev/null +++ b/patches/st-clipboard-0.8.3.diff @@ -0,0 +1,12 @@ +diff --git a/x.c b/x.c +index e5f1737..5cabd60 100644 +--- a/x.c ++++ b/x.c +@@ -673,6 +673,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 b/x.c index 9bfe736..e0e81db 100644 --- a/x.c +++ b/x.c @@ -675,6 +675,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 -- 2.43.0