fix a bug when minimizing a maximized window
Merge pull request #9 from deadalnix/fix_minimize

fix a bug when minimizing a maximized window