From 7725b40709d6739fc0684653dde1d2fd83213160 Mon Sep 17 00:00:00 2001 From: speediegq Date: Sun, 28 Aug 2022 13:09:57 +0200 Subject: [PATCH] Add window decoration option --- options.h | 1 + x.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/options.h b/options.h index d67ca71..5893db0 100644 --- a/options.h +++ b/options.h @@ -62,6 +62,7 @@ static char *font2[] = { "DejaVu Sans Mono:pixelsize=12:antial static int borderpx = 0; /* Size of a small border around the text. */ int allowaltscreen = 1; /* Allow alt screen (1) */ int allowwindowops = 0; /* Allow (insecure) window operations such as setting the clipboard text */ +int windowdecorations = 1; /* Display window decoration (1) */ /* Cursor options */ diff --git a/x.c b/x.c index cc23366..ba10a8b 100644 --- a/x.c +++ b/x.c @@ -1429,6 +1429,13 @@ xinit(int cols, int rows) PropModeReplace, (uchar *) icon_argb, icon_n); } + if (!windowdecorations) { + Atom motifwmhints = XInternAtom(xw.dpy, "_MOTIF_WM_HINTS", False); + unsigned int data[] = { 0x2, 0x0, 0x0, 0x0, 0x0 }; + XChangeProperty(xw.dpy, xw.win, motifwmhints, motifwmhints, 16, + PropModeReplace, (unsigned char *)data, 5); + } + xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False); XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32, PropModeReplace, (uchar *)&thispid, 1);