From: Quentin Rameau <qu...@quinq.eu.org>

Patch letting st not embedding when given Window id is zero, without failing.

---
 st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/st.c b/st.c
index c61b90a..1b419c8 100644
--- a/st.c
+++ b/st.c
@@ -3134,8 +3134,8 @@ xinit(void) {
                | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
        xw.attrs.colormap = xw.cmap;
 
-       parent = opt_embed ? strtol(opt_embed, NULL, 0) : \
-                       XRootWindow(xw.dpy, xw.scr);
+       if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0))))
+               parent = XRootWindow(xw.dpy, xw.scr);
        xw.win = XCreateWindow(xw.dpy, parent, xw.l, xw.t,
                        xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), 
InputOutput,
                        xw.vis, CWBackPixel | CWBorderPixel | CWBitGravity
-- 
2.1.2


Reply via email to