[xsel] Fix xsel not working when pasting large amounts of text

Hans de Goede jwrdegoede at fedoraproject.org
Thu Apr 5 15:04:13 UTC 2012


commit 4d432dde19111703e03b5866b204b64a59b8e485
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Thu Apr 5 17:06:21 2012 +0200

    Fix xsel not working when pasting large amounts of text

 xsel-1.2.0-fix-large-pastes.patch |   13 +++++++++++++
 xsel.spec                         |    8 +++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/xsel-1.2.0-fix-large-pastes.patch b/xsel-1.2.0-fix-large-pastes.patch
new file mode 100644
index 0000000..50c6355
--- /dev/null
+++ b/xsel-1.2.0-fix-large-pastes.patch
@@ -0,0 +1,13 @@
+diff -up xsel-1.2.0/xsel.c~ xsel-1.2.0/xsel.c
+--- xsel-1.2.0/xsel.c~	2012-04-05 16:18:33.000000000 +0200
++++ xsel-1.2.0/xsel.c	2012-04-05 16:30:15.833900611 +0200
+@@ -505,7 +505,8 @@ get_append_property (XSelectionEvent * x
+ 
+   debug_property (D_TRACE, xsl->requestor, xsl->property, target, length);
+ 
+-  if (target != XA_STRING) {
++  if (target != utf8_atom && target != XA_STRING &&
++      target != compound_text_atom) {
+     print_debug (D_OBSC, "target %s not XA_STRING in get_append_property()",
+                  get_atom_name (target));
+     free (*buffer);
diff --git a/xsel.spec b/xsel.spec
index ae863bf..faea6fd 100644
--- a/xsel.spec
+++ b/xsel.spec
@@ -1,6 +1,6 @@
 Name:           xsel
 Version:        1.2.0
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        Command line clipboard and X selection tool
 Group:          Applications/System
 License:        MIT
@@ -8,6 +8,8 @@ URL:            http://www.vergenet.net/~conrad/software/xsel/
 Source0:        http://www.vergenet.net/~conrad/software/xsel/download/xsel-%{version}.tar.gz
 # Applied upstream (BZ#690214)
 Patch0:         xsel-1.2.0-MAX_NUM_TARGETS.patch
+# Upstream: https://github.com/kfish/xsel/commit/ba8656dc7c7e771c802fc957ce3dd128d4b6e3ae
+Patch1:         xsel-1.2.0-fix-large-pastes.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  libSM-devel libXt-devel libXext-devel
 
@@ -20,6 +22,7 @@ you would paste with the middle mouse button.
 %prep
 %setup -q
 %patch0 -p1 -b .MAX_NUM_TARGETS
+%patch1 -p1
 
 %build
 %configure
@@ -39,6 +42,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/xsel
 
 %changelog
+* Thu Apr 05 2012 Hans de Goede <hdegoede at redhat.com> - 1.2.0-10
+- Fix xsel not working when pasting large amounts of text
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list