Flicker fix
also fixes problems with slice layout, because the maximized window
which was not focused just got hidden.