X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=23dd7f1fd76d500252a75c33425b24e3d6aaec2e;hb=008aae541b5cb1e67a025048adef9a06eaa11c2e;hp=bcf96e90d637e35173a2ed190c5bc0bb06478fbd;hpb=cd159883d14c5874446a6ae949be031a1c9d37c2;p=st.git diff --git a/st.c b/st.c index bcf96e9..23dd7f1 100644 --- 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