mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c5f5b2f23 | |||
| ce37146edf | |||
| fa3dd7d553 | |||
| b9021d6581 |
@@ -60,9 +60,9 @@ AmneziaApplication::~AmneziaApplication()
|
|||||||
|
|
||||||
m_vpnConnectionThread.quit();
|
m_vpnConnectionThread.quit();
|
||||||
|
|
||||||
if (!m_vpnConnectionThread.wait(5000)) {
|
if (!m_vpnConnectionThread.wait(4000)) {
|
||||||
m_vpnConnectionThread.terminate();
|
m_vpnConnectionThread.terminate();
|
||||||
m_vpnConnectionThread.wait();
|
m_vpnConnectionThread.wait(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_engine) {
|
if (m_engine) {
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ void PageController::setTriggeredByConnectButton(bool trigger)
|
|||||||
|
|
||||||
void PageController::closeApplication()
|
void PageController::closeApplication()
|
||||||
{
|
{
|
||||||
|
#if defined(Q_OS_LINUX)
|
||||||
|
for (auto w : qApp->topLevelWidgets()) {
|
||||||
|
w->close();
|
||||||
|
}
|
||||||
|
QTimer::singleShot(0, qApp, []() { qApp->exit(0); });
|
||||||
|
#endif
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,17 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
|||||||
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"),
|
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"),
|
||||||
tr("Quit") + " " + APPLICATION_NAME,
|
tr("Quit") + " " + APPLICATION_NAME,
|
||||||
this,
|
this,
|
||||||
[&](){ qApp->quit(); });
|
[&](){
|
||||||
|
#if defined(Q_OS_LINUX)
|
||||||
|
m_systemTrayIcon.hide();
|
||||||
|
m_systemTrayIcon.setContextMenu(nullptr);
|
||||||
|
|
||||||
|
for (auto w : qApp->topLevelWidgets()) {
|
||||||
|
w->close();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
qApp->quit();
|
||||||
|
});
|
||||||
|
|
||||||
m_systemTrayIcon.setContextMenu(&m_menu);
|
m_systemTrayIcon.setContextMenu(&m_menu);
|
||||||
setTrayState(Vpn::ConnectionState::Disconnected);
|
setTrayState(Vpn::ConnectionState::Disconnected);
|
||||||
|
|||||||
Reference in New Issue
Block a user