Fix an issue with restoring maximized windows from fullscreen. Possibly a fix for issue #6 (patch from Aleksandr Samusenko).