From 2626c2c4cf7b1061fda8c6b3aa3dff08421765be Mon Sep 17 00:00:00 2001 From: walker0643 Date: Tue, 30 Jan 2018 16:55:34 -0500 Subject: [PATCH] #6523 The auto hide feature was hidden, so this restores it --- src/gui/src/MainWindow.cpp | 26 ++++++++------------------ src/gui/src/MainWindow.h | 1 - 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 79cee751..951a2ff0 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -207,7 +207,9 @@ void MainWindow::open() { createTrayIcon(); - if (!autoHide()) { + if (appConfig().getAutoHide()) { + hide(); + } else { showNormal(); } @@ -539,24 +541,12 @@ void MainWindow::checkFingerprint(const QString& line) void MainWindow::checkSecureSocket(const QString& line) { - // obviously not very secure, since this can be tricked by injecting something - // into the log. however, since we don't have IPC between core and GUI... patches welcome. - if (line.contains(tlsCheckString)) { - secureSocket(true); - } + // obviously not very secure, since this can be tricked by injecting something + // into the log. however, since we don't have IPC between core and GUI... patches welcome. + if (line.contains(tlsCheckString)) { + secureSocket(true); + } } - -bool MainWindow::autoHide() -{ - if ((appConfig().processMode() == Desktop) && - appConfig().getAutoHide()) { - hide(); - return true; - } - - return false; -} - QString MainWindow::getTimeStamp() { QDateTime current = QDateTime::currentDateTime(); diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index f4df8f4b..812234cd 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -196,7 +196,6 @@ public slots: #ifndef SYNERGY_ENTERPRISE void checkLicense(const QString& line); #endif - bool autoHide(); QString getTimeStamp(); void restartSynergy(); void proofreadInfo();