The main window was already active, so the activate event was never emitted, and m_renderer_has_focus was never changed.