Introduction
Introduction Statistics Contact Development Disclaimer Help
clipboard fix - sselp - simple X selection printer to stdout
git clone git://git.suckless.org/sselp
Log
Files
Refs
README
LICENSE
---
commit 07143813e1c9e632dcdff4cfcaf684fa145a6f4d
parent c3c53904786edb0c646dafaf15e2382eaf8999d2
Author: Connor Lane Smith <[email protected]>
Date: Wed, 11 Aug 2010 15:01:02 +0100
clipboard fix
Diffstat:
M sselp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/sselp.c b/sselp.c
@@ -6,7 +6,7 @@
int
main(int argc, char *argv[]) {
- Atom utf8, type;
+ Atom clip, utf8, type;
Display *dpy;
Window win;
XEvent ev;
@@ -23,15 +23,16 @@ main(int argc, char *argv[]) {
return 1;
utf8 = XInternAtom(dpy, "UTF8_STRING", False);
+ clip = XInternAtom(dpy, "_SSELP_STRING", False);
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1, 1, 0,
CopyFromParent, CopyFromParent);
- XConvertSelection(dpy, XA_PRIMARY, utf8, None, win, CurrentTime);
+ XConvertSelection(dpy, XA_PRIMARY, utf8, clip, win, CurrentTime);
XNextEvent(dpy, &ev);
if(ev.type == SelectionNotify && ev.xselection.property != None) {
do {
- XGetWindowProperty(dpy, win, utf8, off, BUFSIZ, False,
- utf8, &type, &fmt, &len, &more, &da…
+ XGetWindowProperty(dpy, win, ev.xselection.property, o…
+ False, utf8, &type, &fmt, &len, &mo…
fwrite(data, 1, len, stdout);
XFree(data);
off += len;
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.