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