From fbab3f8f3aab91a18ca1211ba833769726077491 Mon Sep 17 00:00:00 2001 From: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:45:05 +0300 Subject: [PATCH 1/3] SYNERGY-1229 Synergy is running after quit on Linux --- src/gui/src/MainWindow.cpp | 7 +++++++ src/gui/src/MainWindow.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 723e35fb4..f4cf9a694 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1506,6 +1506,13 @@ void MainWindow::enableClient(bool enable) } } +void MainWindow::closeEvent(QCloseEvent* event) +{ +#if defined (Q_OS_LINUX) + qApp->quit(); +#endif + QWidget::closeEvent(event); +} void MainWindow::on_m_pRadioGroupServer_clicked(bool) { diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index 748a311de..cf1205b5d 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -195,6 +195,7 @@ public slots: void retranslateMenuBar(); void enableServer(bool enable); void enableClient(bool enable); + void closeEvent(QCloseEvent* event) override; #if defined(Q_OS_WIN) bool isServiceRunning(QString name); From a7c29d5b12f917df4049e43469dc838e839a4933 Mon Sep 17 00:00:00 2001 From: Serhii Hadzhilov Date: Wed, 22 Sep 2021 17:47:29 +0300 Subject: [PATCH 2/3] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index fec0bed5b..0e48bfd19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Bug fixes: - #7082 Windows client doesn't resume connection after sleep - #7089 Modifier keys don't work on Microsoft Remote Desktop - #7091 Fix CMakeFileList for unittests +- #7092 Synergy is running after quit on Linux Enhancements: - #7068 Add Synergy restart when settings changed From b354a2d36e5a2270750789063ae1c3c8308b3b82 Mon Sep 17 00:00:00 2001 From: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com> Date: Wed, 22 Sep 2021 18:07:38 +0300 Subject: [PATCH 3/3] Fix code smell --- src/gui/src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index f4cf9a694..b847703f0 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1509,7 +1509,7 @@ void MainWindow::enableClient(bool enable) void MainWindow::closeEvent(QCloseEvent* event) { #if defined (Q_OS_LINUX) - qApp->quit(); + QCoreApplication::quit(); #endif QWidget::closeEvent(event); }