mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
Some work toward Issue 27 and Issue 319
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
//
|
||||
|
||||
CMSWindowsDesks::CMSWindowsDesks(
|
||||
bool isPrimary, HINSTANCE hookLibrary,
|
||||
bool isPrimary, bool noHooks, HINSTANCE hookLibrary,
|
||||
const IScreenSaver* screensaver, IJob* updateKeys) :
|
||||
m_isPrimary(isPrimary),
|
||||
m_is95Family(CArchMiscWindows::isWindows95Family()),
|
||||
@@ -361,7 +361,7 @@ void
|
||||
CMSWindowsDesks::queryHookLibrary(HINSTANCE hookLibrary)
|
||||
{
|
||||
// look up functions
|
||||
if (m_isPrimary) {
|
||||
if (m_isPrimary && !m_noHooks) {
|
||||
m_install = (InstallFunc)GetProcAddress(hookLibrary, "install");
|
||||
m_uninstall = (UninstallFunc)GetProcAddress(hookLibrary, "uninstall");
|
||||
m_installScreensaver =
|
||||
@@ -736,7 +736,7 @@ CMSWindowsDesks::deskThread(void* vdesk)
|
||||
continue;
|
||||
|
||||
case SYNERGY_MSG_SWITCH:
|
||||
if (m_isPrimary) {
|
||||
if (m_isPrimary && !m_noHooks) {
|
||||
m_uninstall();
|
||||
if (m_screensaverNotify) {
|
||||
m_uninstallScreensaver();
|
||||
@@ -816,11 +816,13 @@ CMSWindowsDesks::deskThread(void* vdesk)
|
||||
break;
|
||||
|
||||
case SYNERGY_MSG_SCREENSAVER:
|
||||
if (msg.wParam != 0) {
|
||||
m_installScreensaver();
|
||||
}
|
||||
else {
|
||||
m_uninstallScreensaver();
|
||||
if (!m_noHooks) {
|
||||
if (msg.wParam != 0) {
|
||||
m_installScreensaver();
|
||||
}
|
||||
else {
|
||||
m_uninstallScreensaver();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user