st
simple terminal
git clone https://9o.is/git/st.git
commit 38269adb401111431549a46742c185a17950858c parent 240132ac53731d2cf5df358be52d915070430378 Author: Quentin Rameau <quinq.ml@gmail.com> Date: Thu, 16 Oct 2014 00:42:53 +0200 Avoid failing when embedding with a Window id of 0 I'd like to let st run with its own window when trying to embed it to a window with id 0 instead of exiting with an error. Diffstat:
| M | st.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/st.c b/st.c @@ -3136,8 +3136,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