checkpoint screensaver changes. now handling xscreensaver

dying and restarting or starting after synergy does.  also
now disabling the screen saver on the client.  next step:
win32 support.
This commit is contained in:
crs
2002-06-23 15:43:40 +00:00
parent 4d113aa235
commit a5391a0a1d
10 changed files with 560 additions and 82 deletions

View File

@@ -1284,6 +1284,12 @@ CServer::handshakeClient(void* vsocket)
// now connected; client no longer subject to timeout.
}
// activate screen saver on new client if active on the
// primary screen
if (m_primary->isScreenSaverActive()) {
protocol->sendScreenSaver(true);
}
// handle messages from client. returns when the client
// disconnects.
log((CLOG_NOTE "client \"%s\" has connected", name.c_str()));

View File

@@ -545,6 +545,13 @@ CXWindowsPrimaryScreen::isLockedToScreen() const
return false;
}
bool
CXWindowsPrimaryScreen::isScreenSaverActive() const
{
CDisplayLock display(this);
return getScreenSaver()->isActive();
}
void
CXWindowsPrimaryScreen::onOpenDisplay(Display* display)
{

View File

@@ -26,6 +26,7 @@ public:
virtual void getClipboard(ClipboardID, IClipboard*) const;
virtual KeyModifierMask getToggleMask() const;
virtual bool isLockedToScreen() const;
virtual bool isScreenSaverActive() const;
protected:
// CXWindowsScreen overrides

View File

@@ -29,6 +29,8 @@ synergyd_LDADD = \
$(DEPTH)/base/libbase.a \
$(X_LIBS) \
$(X_PRE_LIBS) \
-lXtst \
-lXext \
-lX11 \
$(X_EXTRA_LIBS) \
$(NULL)