Fixed issue #308

This commit also fixes a bug that caused the window to not maximize
correctly on a secondary monitor when ignoring the taskbar.
Merge pull request #430 from flagbug/issue-308-fix

Fixed issue #308