diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | x-undecorate.c | 18 |
2 files changed, 19 insertions, 1 deletions
@@ -1,6 +1,6 @@ PREFIX = /usr/local/ SRC = x-session.c -X11SRC = x-move-resize.c x-alt-tab.c x-focus-manager.c x-placement-manager.c +X11SRC = x-move-resize.c x-alt-tab.c x-focus-manager.c x-placement-manager.c x-undecorate.c CC = gcc CFLAGS = -O2 -Wall 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; +} + |
