mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
moved onError() method to IScreenReceiver from IPrimaryScreenReceiver.
also implemented onError in CClient which previously did not have any way to handle display disconnection.
This commit is contained in:
@@ -212,6 +212,20 @@ CServer::getActivePrimarySides() const
|
||||
return sides;
|
||||
}
|
||||
|
||||
void
|
||||
CServer::onError()
|
||||
{
|
||||
// stop all running threads but don't wait too long since some
|
||||
// threads may be unable to proceed until this thread returns.
|
||||
stopThreads(3.0);
|
||||
|
||||
// done with the HTTP server
|
||||
delete m_httpServer;
|
||||
m_httpServer = NULL;
|
||||
|
||||
// note -- we do not attempt to close down the primary screen
|
||||
}
|
||||
|
||||
void
|
||||
CServer::onInfoChanged(const CString& name, const CClientInfo& info)
|
||||
{
|
||||
@@ -334,20 +348,6 @@ CServer::onClipboardChangedNoLock(ClipboardID id,
|
||||
m_active->setClipboard(id, m_clipboards[id].m_clipboardData);
|
||||
}
|
||||
|
||||
void
|
||||
CServer::onError()
|
||||
{
|
||||
// stop all running threads but don't wait too long since some
|
||||
// threads may be unable to proceed until this thread returns.
|
||||
stopThreads(3.0);
|
||||
|
||||
// done with the HTTP server
|
||||
delete m_httpServer;
|
||||
m_httpServer = NULL;
|
||||
|
||||
// note -- we do not attempt to close down the primary screen
|
||||
}
|
||||
|
||||
void
|
||||
CServer::onScreensaver(bool activated)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user