From ebab0eb62ed96f3893df9db12efad52ef20a81d4 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 25 Mar 2026 00:40:33 -0400 Subject: [PATCH] chore: remove unused ScreenException methods for reconnect timer --- src/lib/deskflow/ClientApp.cpp | 4 +--- src/lib/deskflow/ScreenException.cpp | 10 ---------- src/lib/deskflow/ScreenException.h | 17 ----------------- src/lib/platform/XWindowsScreen.cpp | 2 +- 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/lib/deskflow/ClientApp.cpp b/src/lib/deskflow/ClientApp.cpp index 250b313db..f00515962 100644 --- a/src/lib/deskflow/ClientApp.cpp +++ b/src/lib/deskflow/ClientApp.cpp @@ -270,7 +270,6 @@ void ClientApp::closeClient(Client *client) bool ClientApp::startClient() { - double retryTime; deskflow::Screen *clientScreen = nullptr; try { if (m_clientScreen == nullptr) { @@ -290,7 +289,6 @@ bool ClientApp::startClient() } catch (ScreenUnavailableException &e) { LOG_WARN("secondary screen unavailable: %s", e.what()); closeClientScreen(clientScreen); - retryTime = e.getRetryTime(); } catch (ScreenOpenFailureException &e) { LOG_CRIT("failed to start client: %s", e.what()); closeClientScreen(clientScreen); @@ -301,7 +299,7 @@ bool ClientApp::startClient() return false; } - scheduleClientRestart(retryTime); + scheduleClientRestart(s_retryTime); return true; } diff --git a/src/lib/deskflow/ScreenException.cpp b/src/lib/deskflow/ScreenException.cpp index 1161e1908..9204a899e 100644 --- a/src/lib/deskflow/ScreenException.cpp +++ b/src/lib/deskflow/ScreenException.cpp @@ -21,16 +21,6 @@ std::string ScreenOpenFailureException::getWhat() const throw() // ScreenUnavailableException // -ScreenUnavailableException::ScreenUnavailableException(double timeUntilRetry) : m_timeUntilRetry(timeUntilRetry) -{ - // do nothing -} - -double ScreenUnavailableException::getRetryTime() const -{ - return m_timeUntilRetry; -} - std::string ScreenUnavailableException::getWhat() const throw() { return format("ScreenUnavailableException", "unable to open screen"); diff --git a/src/lib/deskflow/ScreenException.h b/src/lib/deskflow/ScreenException.h index cfb5a8a5b..eedc2be6f 100644 --- a/src/lib/deskflow/ScreenException.h +++ b/src/lib/deskflow/ScreenException.h @@ -37,27 +37,10 @@ may be successful. class ScreenUnavailableException : public ScreenOpenFailureException { public: - /*! - \c timeUntilRetry is the suggested time the caller should wait until - trying to open the screen again. - */ - explicit ScreenUnavailableException(double timeUntilRetry); ~ScreenUnavailableException() throw() override = default; - //! @name manipulators - //@{ - - //! Get retry time - /*! - Returns the suggested time to wait until retrying to open the screen. - */ - double getRetryTime() const; - //@} protected: std::string getWhat() const throw() override; - -private: - double m_timeUntilRetry; }; diff --git a/src/lib/platform/XWindowsScreen.cpp b/src/lib/platform/XWindowsScreen.cpp index df0c49d9f..25af166d4 100644 --- a/src/lib/platform/XWindowsScreen.cpp +++ b/src/lib/platform/XWindowsScreen.cpp @@ -837,7 +837,7 @@ Display *XWindowsScreen::openDisplay(const char *displayName) LOG_DEBUG2("calling XOpenDisplay(\"%s\")", displayName); Display *display = XOpenDisplay(displayName); if (display == nullptr) { - throw ScreenUnavailableException(60.0); + throw ScreenUnavailableException(); } // verify the availability of the XTest extension