0

I think it goes like this:

assert(dpy = XOpenDisplay(0));
Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1, 1, 0, 0, 0);
XSelectInput(dpy, win, PropertyChangeMask);

I don't know what to do next.

chila
  • 2,372
  • 1
  • 16
  • 33
  • Possibly a duplicate of [c - How to copy to clipboard with X11?](http://stackoverflow.com/questions/1868734/how-to-copy-to-clipboard-with-x11)? "I don't know what to do next" is a bit broad. Read the available documentation, then come back with a narrower question? – Jongware Aug 31 '14 at 14:10
  • I don't know what to do next to put the text on the clipboard. – chila Sep 01 '14 at 12:28
  • You need to read more documentation than can fit in an answer here. – n. m. could be an AI Sep 01 '14 at 17:17
  • I did and also read the xclip code, but it seems too complicated. The app needs to stay up and running listening to apps that need the data apparently. I ended up forking xclip from inside my app and giving it the text (through a pipe). With this I have the advantage of not having X11 code inside my app. – chila Sep 01 '14 at 22:36

0 Answers0