/* * This file is made by Bernhard R. Link from parts of ratpoison, which is * Copyright (C) 2000, 2001, 2002, 2003, 2004 Shawn Betts * * ratpoison is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * ratpoison is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA */ #include #include #include #include #include int main (int argc, char *argv[]) { Window w, root; Display *dpy; Atom rp_command_request; if (!(dpy = XOpenDisplay (NULL))) { fprintf (stderr, "Can't open display\n"); return EXIT_FAILURE; } /* Set ratpoison specific Atoms. */ rp_command_request = XInternAtom (dpy, "RP_COMMAND_REQUEST", False); root = DefaultRootWindow (dpy); w = XCreateSimpleWindow (dpy, root, 0, 0, 1, 1, 0, 0, 0); XChangeProperty (dpy, root, rp_command_request, XA_WINDOW, 8, PropModeAppend, (unsigned char *)&w, sizeof (Window)); sleep(5); XDestroyWindow (dpy, w); XCloseDisplay (dpy); return EXIT_SUCCESS; }