diff --git a/frontend/mainwindow.cpp b/frontend/mainwindow.cpp index f9a6f11..9dd2096 100644 --- a/frontend/mainwindow.cpp +++ b/frontend/mainwindow.cpp @@ -156,7 +156,8 @@ void MainWindow::initConnections() setSearchMethodConfig(isCreateIndex, isAskAgain); }); connect(m_askDialog, &CreateIndexAskDialog::focusChanged, this, [ & ] { - if (QApplication::activeWindow() != this) { + if (kdk::WindowManager::currentActiveWindow() != this->winId() && + kdk::WindowManager::currentActiveWindow() != m_askDialog->winId()) { this->tryHideMainwindow(); } });