UI: WindowManager::activateModalWidget: Check ApplicationModal only

This commit is contained in:
Nodir Temirkhodjaev 2023-12-24 17:35:22 +03:00
parent 4995cb3b3b
commit 108ba9764d
2 changed files with 2 additions and 2 deletions

View File

@ -757,7 +757,7 @@ void TrayIcon::onTrayActivatedByTrigger()
if (clickAction(DoubleClick)) {
m_trayTriggered = true;
QTimer::singleShot(QApplication::doubleClickInterval(), this,
[=] { onTrayActivatedByClick(clickType, /*checkTriggered=*/true); });
[=, this] { onTrayActivatedByClick(clickType, /*checkTriggered=*/true); });
} else {
onTrayActivatedByClick(clickType);
}

View File

@ -709,7 +709,7 @@ bool WindowManager::isAnyWindowOpen(quint32 codes) const
bool WindowManager::activateModalWidget()
{
auto w = QApplication::activeModalWidget();
if (w) {
if (w && w->windowModality() == Qt::ApplicationModal) {
WidgetWindow::showWidget(w);
return true;
}