Fix size reset for maximized windows
Merge pull request #1494 from DanWin/window

Fix size reset for maximized windows