| #include <X11/Xlib.h> | |
| #include <X11/Xos.h> | |
| #include <X11/Xatom.h> | |
| int main(int argc, const char* argv[]) | |
| { | |
| Display *d = XOpenDisplay(NULL); | |
| Window w = XCreateSimpleWindow(d, RootWindow(d, 0), 1, 1, 500, 500, 0, | |
| BlackPixel (d, 0), BlackPixel(d, 0)); | |
| Atom a; | |
| XMapWindow(d, w); | |
| if ((a = XInternAtom(d, argv[1], False)) != None) | |
| XChangeProperty(d, w, a, XA_STRING, 8, PropModeReplace, argv[2], strlen(argv[2])); | |
| XFlush(d); | |
| sleep(30); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment