bugfix: the window is misplaced when the user connects an external monitor - the window will be presented at the same Y coordinate when it was before on the smaller screen [fixed] + some code DRY