diff --git a/src/gui/src/ServerConfig.cpp b/src/gui/src/ServerConfig.cpp index 6b0a890e..693e26b8 100644 --- a/src/gui/src/ServerConfig.cpp +++ b/src/gui/src/ServerConfig.cpp @@ -374,13 +374,16 @@ int ServerConfig::showAddClientDialog(const QString& clientName) { int result = kAddClientIgnore; - if (m_pMainWindow->isActiveWindow()) { - AddClientDialog addClientDialog(clientName, m_pMainWindow); - addClientDialog.exec(); - result = addClientDialog.addResult(); - m_IgnoreAutoConfigClient = addClientDialog.ignoreAutoConfigClient(); + if (!m_pMainWindow->isActiveWindow()) { + m_pMainWindow->showNormal(); + m_pMainWindow->activateWindow(); } + AddClientDialog addClientDialog(clientName, m_pMainWindow); + addClientDialog.exec(); + result = addClientDialog.addResult(); + m_IgnoreAutoConfigClient = addClientDialog.ignoreAutoConfigClient(); + return result; }