Merge pull request #6859 from symless/SYNERGY-508-systray-icon-does-not-work-on-initial-boot-ubuntu

removing unnecessary check on icon tray
This commit is contained in:
Andrea Candian 2020-12-02 00:34:06 -08:00 committed by GitHub
commit 205624725f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 34 deletions

View file

@ -6,6 +6,7 @@ Bug fixes:
- #6838 Enterprise asks for serial key on Linux system
- #6849 Auto-hide resets itself
- #6846 TLS certificate is not created by default for Synergy Enterprise.
- #6??? Systray Icon on Ubuntu Auto Start
Enhancements:
- #6836 Enabling Github Code Scanning

View file

@ -16,9 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define TRAY_RETRY_COUNT 10
#define TRAY_RETRY_WAIT 2000
#include "QSynergyApplication.h"
#include "LicenseManager.h"
#include "MainWindow.h"
@ -46,7 +43,6 @@ public:
}
};
int waitForTray();
QString getSystemSettingPath();
#if defined(Q_OS_MAC)
@ -80,11 +76,6 @@ int main(int argc, char* argv[])
}
#endif
if (!waitForTray())
{
return -1;
}
#ifndef Q_OS_WIN
QApplication::setQuitOnLastWindowClosed(false);
#endif
@ -120,31 +111,6 @@ int main(int argc, char* argv[])
return app.exec();
}
int waitForTray()
{
// on linux, the system tray may not be available immediately after logging in,
// so keep retrying but give up after a short time.
int trayAttempts = 0;
while (true)
{
if (QSystemTrayIcon::isSystemTrayAvailable())
{
break;
}
if (++trayAttempts > TRAY_RETRY_COUNT)
{
QMessageBox::critical(NULL, "Synergy",
QObject::tr("System tray is unavailable, don't close your window."));
return true;
}
QThreadImpl::msleep(TRAY_RETRY_WAIT);
}
return true;
}
#if defined(Q_OS_MAC)
bool checkMacAssistiveDevices()