From a31fead128bb52aabe33fde5446c625811f23b3a Mon Sep 17 00:00:00 2001 From: Patrick Haller Date: Sun, 6 Mar 2011 23:50:10 +0800 Subject: added x-undecorate.c --- x-undecorate.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 x-undecorate.c (limited to 'x-undecorate.c') diff --git a/x-undecorate.c b/x-undecorate.c new file mode 100644 index 0000000..be40001 --- /dev/null +++ b/x-undecorate.c @@ -0,0 +1,18 @@ +#include +#include + +// mark a window as undecorated +// i.e. remove the borders and titlebar + +int main(int argc, char **argv) +{ + Display *dpy; + XSetWindowAttributes c_wa; + + if ( ! (dpy = XOpenDisplay(0x0) )) + return -1; + + XChangeWindowAttributes(dpy, atoi(argv[1]), CWOverrideRedirect, &c_wa); + return 0; +} + -- cgit v1.2.3