diff options
| author | Patrick Haller <patrick@haller.ws> | 2011-03-06 23:50:10 +0800 |
|---|---|---|
| committer | Patrick Haller <patrick@haller.ws> | 2011-03-06 23:50:10 +0800 |
| commit | a31fead128bb52aabe33fde5446c625811f23b3a (patch) | |
| tree | cb74c6491d30f5e45f5940960d2f9aada6f6b0d7 /x-undecorate.c | |
| parent | c7572b0e4442c3326341ffbad547643ce9d6adfd (diff) | |
added x-undecorate.c
Diffstat (limited to 'x-undecorate.c')
| -rw-r--r-- | x-undecorate.c | 18 |
1 files changed, 18 insertions, 0 deletions
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 <stdlib.h> +#include <X11/Xlib.h> + +// 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; +} + |
