What file is responsible for saving window position?
Assuming the app uses NSWindow, then the position of document windows is usually described in the application's preference file like this:
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
    &lt;key&gt;NSWindow Frame TextWindow&lt;/key&gt;
    &lt;string&gt;1324 504 544 481 0 0 2560 1417 &lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;

.
For an Apple app, the .plist will be in something like ~/Library/Containers/com.apple.TextEdit/Data/Library/Preferences
A windows.plist file in Containers ... Saved Application State may also hold relevant data.