In manpage of xdotool
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)?