Debian Bug report logs - #172812
xclip: xclip doesn't work with kde due to lack of content negotiation (patch included)

version graph

Package: xclip; Maintainer for xclip is Alessandro Ghedini <ghedo@debian.org>; Source for xclip is src:xclip.

Reported by: apenwarr@nit.ca

Date: Thu, 12 Dec 2002 18:48:04 UTC

Severity: normal

Found in version 0.08-1

Fixed in version xclip/0.08-2

Done: Baruch Even <baruch@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Kim Saunders <kim.saunders@mercuryit.com.au>, xclip@packages.qa.debian.org:
Bug#172812; Package xclip. Full text and rfc822 format available.

Acknowledgement sent to apenwarr@nit.ca:
New Bug report received and forwarded. Copy sent to Kim Saunders <kim.saunders@mercuryit.com.au>, xclip@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: apenwarr@nit.ca
To: submit@bugs.debian.org
Subject: xclip: xclip doesn't work with kde due to lack of content negotiation (patch included)
Date: Thu, 12 Dec 2002 13:19:55 -0500
Package: xclip
Version: 0.08-1
Severity: normal

Here's a patch that makes xclip work with kde.  kde uses the X clipboard's
content negotiation features, which almost nobody else does, but xclip was
doing the wrong thing when asked for content negotiation stuff.

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux insight 2.4.19 #1 mer sep 4 10:52:04 EDT 2002 i686 unknown

Versions of the packages xclip depends on:
ii  libc6          2.2.5-14       GNU C Library: Shared libraries and Timezone
ii  xlibs          4.2.1-0pre1v2  X Window System client libraries



diff -u xclip-0.08/xclib.c xclip-0.08+ave/xclib.c
--- xclip-0.08/xclib.c	Mon Dec 17 01:14:40 2001
+++ xclip-0.08+ave/xclib.c	Thu Dec 12 13:16:57 2002
@@ -100,7 +100,7 @@
 )
 {
 	/* a property for other windows to put their selection into */
-	Atom pty, inc, pty_type;
+	Atom pty, inc, pty_type, targets;
 	int pty_format;
 		
 	/* buffer for XGetWindowProperty to dump data into */
@@ -111,6 +111,7 @@
 	unsigned char *ltxt;
 
 	pty = XInternAtom(dpy, "XCLIP_OUT", False);
+	targets = XInternAtom(dpy, "TARGETS", False);
 
 	switch (*context)
 	{
@@ -353,7 +354,9 @@
 					 * transfers only)
 					 */
 	XEvent		res;		/* response to event */
-	Atom		inc;
+	Atom		inc, targets;
+
+	targets = XInternAtom(dpy, "TARGETS", False);
 
 	switch (*context)
 	{
@@ -369,7 +372,22 @@
 			*pos = 0;
 		
 			/* put the data into an property */
-			if (len > XC_CHUNK)
+			if (evt.xselectionrequest.target == targets)
+			{
+				Atom types[2] = { targets, XA_STRING };
+			
+				/* send data all at once (not using INCR) */
+				XChangeProperty(
+					dpy,
+					*win,
+					*pty,
+					targets,
+					8,
+					PropModeReplace,
+					(unsigned char*) types,
+					(int)sizeof(types)
+			       );
+			} else if (len > XC_CHUNK)
 			{
 				/* INCR Atom to set response property to */
 				inc = XInternAtom(dpy, "INCR", False);




Information forwarded to debian-bugs-dist@lists.debian.org, Kim Saunders <kim.saunders@mercuryit.com.au>:
Bug#172812; Package xclip. Full text and rfc822 format available.

Acknowledgement sent to Phil Edwards <pme@devphil.com>:
Extra info received and forwarded to list. Copy sent to Kim Saunders <kim.saunders@mercuryit.com.au>. Full text and rfc822 format available.

Message #10 received at 172812@bugs.debian.org (full text, mbox):

From: Phil Edwards <pme@devphil.com>
To: 172812@bugs.debian.org
Subject: Re: xclip: xclip doesn't work with kde due to lack of content negotiation (patch included)
Date: Tue, 2 Sep 2003 20:58:36 -0400
I've just installed xclip and was becoming slightly frustrated by the lack
of communication between xclip and KDE's klipper.  This patch is /precisely/
what I needed.  Now they work together perfectly!

Thanks, apenwarr@nit.ca.

Phil

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
    - Brian W. Kernighan



Reply sent to Baruch Even <baruch@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to apenwarr@nit.ca:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #15 received at 172812-close@bugs.debian.org (full text, mbox):

From: Baruch Even <baruch@debian.org>
To: 172812-close@bugs.debian.org
Subject: Bug#172812: fixed in xclip 0.08-2
Date: Sat, 19 Jun 2004 02:02:03 -0400
Source: xclip
Source-Version: 0.08-2

We believe that the bug you reported is fixed in the latest version of
xclip, which is due to be installed in the Debian FTP archive:

xclip_0.08-2.diff.gz
  to pool/main/x/xclip/xclip_0.08-2.diff.gz
xclip_0.08-2.dsc
  to pool/main/x/xclip/xclip_0.08-2.dsc
xclip_0.08-2_i386.deb
  to pool/main/x/xclip/xclip_0.08-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 172812@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Baruch Even <baruch@debian.org> (supplier of updated xclip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 19 Jun 2004 07:58:19 +0300
Source: xclip
Binary: xclip
Architecture: source i386
Version: 0.08-2
Distribution: unstable
Urgency: low
Maintainer: Baruch Even <baruch@debian.org>
Changed-By: Baruch Even <baruch@debian.org>
Description: 
 xclip      - command line interface to X selections
Closes: 172812 254392
Changes: 
 xclip (0.08-2) unstable; urgency=low
 .
   * Taking over maintainership (closes: bug#254392)
   * Add Homepage link to description
   * Updated to latest policy version (3.6.1), no changes needed.
   * Fix a corruption bug when transferring large buffers (larger than 4096
     bytes).
   * Solve KDE integration with xclip (closes: bug#172812)
Files: 
 52950670a905666dbd6bfc45282dfa71 567 x11 optional xclip_0.08-2.dsc
 a8bd3d354064a97617378c6e4ae5976a 11022 x11 optional xclip_0.08-2.diff.gz
 919f031acc2a62ac08959285f3e2e9a4 15358 x11 optional xclip_0.08-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA09PHHCar6qtHRZgRAoXeAKChp8arAza7I8XYfPLJUN09NiF/9gCg1EAQ
FVSxbGmYOcYe9BWMA3cieJc=
=QpOn
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 12:20:33 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.