rem: pid = GetPidForWindow(wwin->client_win);
add: pid = wNETWMGetPidForWindow(wwin->client_win);
context: fixLeaderProperties(WWindow *wwin){    XClassHint *classHint;    XWMHints *hints, *clientHints;    Window leaders[2], window;    char **argv, *command;    int argc, i, pid;    Bool haveCommand;    classHint = XAllocClassHint();    clientHints = XGetWMHints(dpy, wwin->client_win);    pid = GetPidForWindow(wwin->client_win);    if (pid > 0) {        haveCommand = GetCommandForPid(pid, &argv, &argc);    } else {        haveCommand = False;    }    leaders[0] = wwin->client_leader;    leaders[1] = wwin->group_id;    if (haveCommand) {        command = GetCommandForWindow(wwin->client_win);        if (command) {            /* command already set. nothing to do. */            wfree(command);        } else {            XSetCommand(dpy, wwin->client_win, argv, argc);        }    }    for (i=0; i<2; i++) {        window = leaders[i];        if (window) {            if (XGetClassHint(dpy, window, classHint) == 0) {                classHint->res_name  = wwin->wm_instance;                classHint->res_class = wwin->wm_class;                XSetClassHint(dpy, window, classHint);            }            hints = XGetWMHints(dpy, window);            if (hints) {                XFree(hints);            } else if (clientHints) {                /* set window group leader to self */                clientHints->window_group = window;                clientHints->flags |= WindowGroupHint;                XSetWMHints(dpy, window, clientHints);            }            if (haveCommand) {                command = GetCommandForWindow(window);                if (command) {                    /* command already set. nothing to do. */                    wfree(command);                } else {                    XSetCommand(dpy, window, argv, argc);                }            }        }    }    XFree(classHint);    if (clientHints) {        XFree(clientHints);    }    if (haveCommand) {        wfree(argv);    }}