Add window decoration option

This commit is contained in:
speediegq 2022-08-28 13:09:57 +02:00
parent 586b8ad2b9
commit 7725b40709
2 changed files with 8 additions and 0 deletions

View file

@ -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 */

7
x.c
View file

@ -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);