2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Fix crash with event loop nesting tracking.

This commit is contained in:
John Preston
2019-04-12 17:21:01 +04:00
parent cc8f4aa24f
commit 7cfb122dea
7 changed files with 27 additions and 13 deletions

View File

@@ -675,9 +675,13 @@ void MainWindow::showFromTray(QSystemTrayIcon::ActivationReason reason) {
}
}
void MainWindow::toggleTray(QSystemTrayIcon::ActivationReason reason) {
void MainWindow::handleTrayIconActication(
QSystemTrayIcon::ActivationReason reason) {
updateIsActive(0);
if ((cPlatform() == dbipMac || cPlatform() == dbipMacOld) && isActive()) return;
if ((cPlatform() == dbipMac || cPlatform() == dbipMacOld)
&& isActive()) {
return;
}
if (reason == QSystemTrayIcon::Context) {
updateTrayMenu(true);
QTimer::singleShot(1, this, SLOT(psShowTrayMenu()));