In manpage of xdotool
getwindowpid [window]Output the PID owning a given window. This requires effort from the application owning a window and may not work for all windows. This uses _NET_WM_PID property of the window. See "EXTENDED WINDOW MANAGER HINTS" below for more information.
When a process is said to own a window, what does that mean? I have several guesses about it:
Is the process the one which has created the window?
A window is not a process, so ownership can't imply the parent-child relation between processes.
what is the relation between a window of a process and the controlling terminal of the same process ('s session)? Is a window of a process related to terminal related signals (SIGINT, SIGHUP, SIGQUIT)?
Thanks.
_NET_WM_PIDproperty on any window to whatever it likes, eg.xprop -id $WINDOWID -f _NET_WM_PID 32c -set _NET_WM_PID 1will not make your terminal window owned byinit. Processes and/or X11 clients do not own windows.