diff options
author | wiz <wiz> | 2007-06-08 17:49:54 +0000 |
---|---|---|
committer | wiz <wiz> | 2007-06-08 17:49:54 +0000 |
commit | 63a42b35967f0b0061ac38b0b2f70e10595afc42 (patch) | |
tree | beda04d5ec3aaceb2e6c425910cbfb8e6ebe7d13 /x11/xclip/patches/patch-aa | |
parent | b2215e700c8d7c8f141573f1a5367c5fa873032f (diff) | |
download | pkgsrc-63a42b35967f0b0061ac38b0b2f70e10595afc42.tar.gz |
Sergey Svishchev writes (in PR 33255), providing a patch:
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 (from Debian bug report 172812).
Bump PKGREVISION.
Diffstat (limited to 'x11/xclip/patches/patch-aa')
-rw-r--r-- | x11/xclip/patches/patch-aa | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/x11/xclip/patches/patch-aa b/x11/xclip/patches/patch-aa new file mode 100644 index 00000000000..d42959d0dfa --- /dev/null +++ b/x11/xclip/patches/patch-aa @@ -0,0 +1,58 @@ +$NetBSD: patch-aa,v 1.1 2007/06/08 17:49:54 wiz Exp $ + +KDE integration (from Debian bug 172812) + +--- xclib.c.orig Mon Dec 17 01:14:40 2001 ++++ 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); |