From 14a5ff23ce496c32a368e089de6447875b9b1c3d Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Wed, 3 Jan 2024 16:28:18 +0800 Subject: [PATCH] fix(frontend):mainwindow will hide after clicking the buttons on the create index dialog. --- frontend/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } });