Given a process iD of XX, I\'d like to have a list of any window id\'s where _NET_WM_PID = XX. Even better would be the oldest still active window id if possible.
I
You can use:
xdotool getwindowfocus getwindowname
(As is: you don't need to replace those nice-sounding names with anything.)