fix two small window positioning bugs

a couple of bugfixes regarding saving and restoring window positions. it's possible they only manifest on win32, so I was careful not to break stuff on other platforms.

details in individual commit comments.