[wiki] [sites] include st patch to make selecting text not affect the clipboard selection || Greg Reagle

From: <git_AT_suckless.org>
Date: Mon, 23 Feb 2015 17:30:15 +0100

commit e8b611564e663747d6d829394160fdf8f17ae157
Author: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Mon Feb 23 11:11:44 2015 -0500

    include st patch to make selecting text not affect the clipboard selection

diff --git a/st.suckless.org/patches/no_clobber_clipboard.md b/st.suckless.org/patches/no_clobber_clipboard.md
new file mode 100644
index 0000000..b7da56d
--- /dev/null
+++ b/st.suckless.org/patches/no_clobber_clipboard.md
_AT_@ -0,0 +1,21 @@
+Do not clobber clipboard
+========================
+
+Description
+-----------
+
+By default, st sets both the primary selection and the clipboard
+selection to the (mouse) selected text. This patch changes st so that
+selecting text affects only the primary selection, not the clipboard
+selection. This patch makes st conform to the guidelines at
+[freedesktop.org](http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt).
+
+Download
+--------
+
+* [st-no-clobber-clipboard.diff](st-no-clobber-clipboard.diff)
+
+Author
+------
+
+ * Wander Nauta - info_AT_wandernauta.nl
diff --git a/st.suckless.org/patches/st-no-clobber-clipboard.diff b/st.suckless.org/patches/st-no-clobber-clipboard.diff
new file mode 100644
index 0000000..b10ddab
--- /dev/null
+++ b/st.suckless.org/patches/st-no-clobber-clipboard.diff
_AT_@ -0,0 +1,33 @@
+From 7552a9358aecd38006cdbcff61491ae8e713aa13 Mon Sep 17 00:00:00 2001
+From: Wander Nauta <info_AT_wandernauta.nl>
+Date: Fri, 20 Feb 2015 00:36:48 +0100
+Subject: [PATCH] Don't clobber CLIPBOARD
+
+---
+ st.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/st.c b/st.c
+index b9d30a7..5af4dc2 100644
+--- a/st.c
++++ b/st.c
+_AT_@ -1080,16 +1080,9 @@ selrequest(XEvent *e) {
+
+ void
+ xsetsel(char *str) {
+- /* register the selection for both the clipboard and the primary */
+- Atom clipboard;
+-
+ free(sel.clip);
+ sel.clip = str;
+-
+ XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, CurrentTime);
+-
+- clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+- XSetSelectionOwner(xw.dpy, clipboard, xw.win, CurrentTime);
+ }
+
+ void
+--
+2.3.0
+
Received on Mon Feb 23 2015 - 17:30:15 CET

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:40:10 CEST