mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-09 16:02:46 +08:00
win32 screen saver now handled.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "CClient.h"
|
||||
#include "CClipboard.h"
|
||||
#include "CMSWindowsClipboard.h"
|
||||
#include "CMSWindowsScreenSaver.h"
|
||||
#include "CPlatform.h"
|
||||
#include "XScreen.h"
|
||||
#include "CLock.h"
|
||||
@@ -97,6 +98,9 @@ CMSWindowsSecondaryScreen::open(CClient* client)
|
||||
grabClipboard(id);
|
||||
}
|
||||
|
||||
// disable the screen saver
|
||||
getScreenSaver()->disable();
|
||||
|
||||
// hide the cursor
|
||||
m_active = true;
|
||||
leave();
|
||||
@@ -107,6 +111,9 @@ CMSWindowsSecondaryScreen::close()
|
||||
{
|
||||
assert(m_client != NULL);
|
||||
|
||||
// restore the screen saver settings
|
||||
getScreenSaver()->enable();
|
||||
|
||||
// close the display
|
||||
closeDisplay();
|
||||
|
||||
@@ -382,6 +389,17 @@ CMSWindowsSecondaryScreen::grabClipboard(ClipboardID /*id*/)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CMSWindowsSecondaryScreen::screenSaver(bool activate)
|
||||
{
|
||||
if (activate) {
|
||||
getScreenSaver()->activate();
|
||||
}
|
||||
else {
|
||||
getScreenSaver()->deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CMSWindowsSecondaryScreen::getMousePos(SInt32& x, SInt32& y) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user