mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
Compare commits
4 Commits
4.8.14.1
...
fix/linux-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c5f5b2f23 | ||
|
|
ce37146edf | ||
|
|
fa3dd7d553 | ||
|
|
b9021d6581 |
@@ -60,9 +60,9 @@ AmneziaApplication::~AmneziaApplication()
|
||||
|
||||
m_vpnConnectionThread.quit();
|
||||
|
||||
if (!m_vpnConnectionThread.wait(5000)) {
|
||||
if (!m_vpnConnectionThread.wait(4000)) {
|
||||
m_vpnConnectionThread.terminate();
|
||||
m_vpnConnectionThread.wait();
|
||||
m_vpnConnectionThread.wait(1000);
|
||||
}
|
||||
|
||||
if (m_engine) {
|
||||
|
||||
@@ -136,6 +136,12 @@ void PageController::setTriggeredByConnectButton(bool trigger)
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,17 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
||||
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"),
|
||||
tr("Quit") + " " + APPLICATION_NAME,
|
||||
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);
|
||||
setTrayState(Vpn::ConnectionState::Disconnected);
|
||||
|
||||
Reference in New Issue
Block a user