Startup positioning / size improvements

Turns out that my fix from #416 was not very robust - I've seen the window y position go as low as -22 when maximized... Wondering if this is even enough.

I also separted this logic for x and y, which means that the x postion will not be reset to 0 as soon as the y position exceeds the bounds.