summaryrefslogtreecommitdiff
path: root/x-undecorate.c
diff options
context:
space:
mode:
Diffstat (limited to 'x-undecorate.c')
-rw-r--r--x-undecorate.c18
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;
+}
+