Store _window as soon as possible
Created by: ederag
Fix #571 (closed). Rationale: https://github.com/projecthamster/hamster/issues/571#issuecomment-591569158.
Created by: ederag
Fix #571 (closed). Rationale: https://github.com/projecthamster/hamster/issues/571#issuecomment-591569158.