@@ -183,9 +183,6 @@ void ShellApplication::onScreenAdded(QScreen * /*screen*/)
183183 if (screens().count() == 2) {
184184 m_shellView->setScreen(screens().at(1));
185185 m_qmlArgs.setDeviceName(QStringLiteral("desktop"));
186− // Changing the QScreen where a QWindow is drawn makes it also lose focus (besides having
187− // its backing QPlatformWindow recreated). So lets refocus it.
188− m_shellView->requestActivate();
189186 // QWindow::destroy() is called when it changes between screens. We have to manually make it visible again
190187 // <dandrader> This bug is supposedly fixed in Qt 5.5.1, although I can still reproduce it there. :-/
191188 m_shellView->setVisible(true);
@@ -196,6 +193,12 @@ void ShellApplication::onScreenAdded(QScreen * /*screen*/)
196193 // QWindow::showFullScreen() also calls QWindow::requestActivate() and we don't want that!
197194 m_secondaryWindow->setWindowState(Qt::WindowFullScreen);
198195 m_secondaryWindow->setVisible(true);
196+
197+ // Changing the QScreen where a QWindow is drawn makes it also lose focus (besides having
198+ // its backing QPlatformWindow recreated). So lets refocus it.
199+ // This must be done after the creation of the SecondaryWindow, else
200+ // the SecondaryWindow takes focus anyway.
201+ m_shellView->requestActivate();
199202 }
200203}
201204