>       xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);
>       XSetWMProtocols(xw.dpy, xw.win, &xw.wmdeletewin, 1);
>  
> +     if (!pid)
> +             pid = getpid();
> +     xw.netwmpid = XInternAtom(xw.dpy, "_NET_WM_PID", False);
> +     XChangeProperty(xw.dpy, xw.win, xw.netwmpid, XA_CARDINAL, 32,
> +                     PropModeReplace, (unsigned char *)&pid, 1);

pid is a variable for the pid of the slave process, so I think it
is a bit confusing using it for the pid of the master process, and
if the order of the initialization is changed we will lost the slave
pid.  I think could be better to use a local variable.

Regards,

-- 
Roberto E. Vargas Caballero

Reply via email to