Merge pull request #1494 from DanWin/window

Fix size reset for maximized windows
Hide windows instead of closing them when clicking on close