mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-26 22:03:24 +08:00
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:
@@ -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()));
|
||||
|
||||
@@ -545,6 +545,13 @@ CXWindowsPrimaryScreen::isLockedToScreen() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
CXWindowsPrimaryScreen::isScreenSaverActive() const
|
||||
{
|
||||
CDisplayLock display(this);
|
||||
return getScreenSaver()->isActive();
|
||||
}
|
||||
|
||||
void
|
||||
CXWindowsPrimaryScreen::onOpenDisplay(Display* display)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,6 +29,8 @@ synergyd_LDADD = \
|
||||
$(DEPTH)/base/libbase.a \
|
||||
$(X_LIBS) \
|
||||
$(X_PRE_LIBS) \
|
||||
-lXtst \
|
||||
-lXext \
|
||||
-lX11 \
|
||||
$(X_EXTRA_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
Reference in New Issue
Block a user