From 6472b71c1ac8a4c781cc9986192bff6cf091cd76 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Wed, 24 Aug 2022 11:14:47 +0200 Subject: [PATCH] Adding the no window decorations patch --- ...ow_decorations-0.8.5-20220824-72fd327.diff | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 st/st-no_window_decorations-0.8.5-20220824-72fd327.diff diff --git a/st/st-no_window_decorations-0.8.5-20220824-72fd327.diff b/st/st-no_window_decorations-0.8.5-20220824-72fd327.diff new file mode 100644 index 0000000..4bd4b4b --- /dev/null +++ b/st/st-no_window_decorations-0.8.5-20220824-72fd327.diff @@ -0,0 +1,37 @@ +From abd444fde0fc6c6d4c297a55110e7eeb64a2661d Mon Sep 17 00:00:00 2001 +From: Bakkeby +Date: Wed, 24 Aug 2022 11:10:59 +0200 +Subject: [PATCH] Adding no window decorations patch + +This patch sets the _MOTIF_WM_HINTS property on the st window which +will allow the window to be drawn without window decorations if the +window manager supports it. + +In GNOME and KDE this should allow the window to be drawn without a +title bar at the top. + +In dwm if the decoration hints patch is applied then the st window +should start without a window border. +--- + x.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/x.c b/x.c +index 2a3bd38..37d893f 100644 +--- a/x.c ++++ b/x.c +@@ -1220,6 +1220,11 @@ xinit(int cols, int rows) + xw.netwmiconname = XInternAtom(xw.dpy, "_NET_WM_ICON_NAME", False); + XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1); + ++ 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); +-- +2.37.2 +