Add window decoration option
This commit is contained in:
parent
586b8ad2b9
commit
7725b40709
|
@ -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. */
|
static int borderpx = 0; /* Size of a small border around the text. */
|
||||||
int allowaltscreen = 1; /* Allow alt screen (1) */
|
int allowaltscreen = 1; /* Allow alt screen (1) */
|
||||||
int allowwindowops = 0; /* Allow (insecure) window operations such as setting the clipboard text */
|
int allowwindowops = 0; /* Allow (insecure) window operations such as setting the clipboard text */
|
||||||
|
int windowdecorations = 1; /* Display window decoration (1) */
|
||||||
|
|
||||||
/* Cursor options */
|
/* Cursor options */
|
||||||
|
|
||||||
|
|
7
x.c
7
x.c
|
@ -1429,6 +1429,13 @@ xinit(int cols, int rows)
|
||||||
PropModeReplace, (uchar *) icon_argb, icon_n);
|
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);
|
xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False);
|
||||||
XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
|
XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
|
||||||
PropModeReplace, (uchar *)&thispid, 1);
|
PropModeReplace, (uchar *)&thispid, 1);
|
||||||
|
|
Loading…
Reference in a new issue