fix(frontend):wayland下关闭索引弹窗会导致搜索退出。

This commit is contained in:
JunjieBai 2024-06-18 15:57:38 +08:00 committed by iaom
parent 254a4bc9d8
commit 2aabddb196
1 changed files with 1 additions and 2 deletions

View File

@ -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();
}
});