2012-06-10 16:50:54 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2016-09-07 14:24:00 +00:00
|
|
|
* Copyright (C) 2012-2016 Symless Ltd.
|
2012-09-04 02:09:56 +00:00
|
|
|
* Copyright (C) 2003 Chris Schoeneman
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2014-02-28 12:36:45 +00:00
|
|
|
#include "synergy/Screen.h"
|
|
|
|
|
#include "base/IEventQueue.h"
|
2024-07-02 19:07:06 +00:00
|
|
|
#include "base/Log.h"
|
2014-02-28 12:36:45 +00:00
|
|
|
#include "base/TMethodEventJob.h"
|
2024-07-02 19:07:06 +00:00
|
|
|
#include "server/ClientProxy.h"
|
|
|
|
|
#include "synergy/IPlatformScreen.h"
|
|
|
|
|
#include "synergy/protocol_types.h"
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2014-11-11 17:45:24 +00:00
|
|
|
namespace synergy {
|
|
|
|
|
|
2012-06-10 16:50:54 +00:00
|
|
|
//
|
2014-11-11 13:51:47 +00:00
|
|
|
// Screen
|
2012-06-10 16:50:54 +00:00
|
|
|
//
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
Screen::Screen(IPlatformScreen *platformScreen, IEventQueue *events)
|
2024-07-16 13:36:44 +00:00
|
|
|
: m_screen(platformScreen),
|
|
|
|
|
m_isPrimary(platformScreen->isPrimary()),
|
|
|
|
|
m_enabled(false),
|
|
|
|
|
m_entered(m_isPrimary),
|
|
|
|
|
m_fakeInput(false),
|
|
|
|
|
m_events(events),
|
|
|
|
|
m_mock(false),
|
|
|
|
|
m_enableDragDrop(false) {
|
2024-07-02 19:07:06 +00:00
|
|
|
assert(m_screen != NULL);
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// reset options
|
|
|
|
|
resetOptions();
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
LOG((CLOG_DEBUG "opened display"));
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
Screen::~Screen() {
|
|
|
|
|
if (m_mock) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2013-07-16 19:02:30 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
if (m_enabled) {
|
|
|
|
|
disable();
|
|
|
|
|
}
|
|
|
|
|
assert(!m_enabled);
|
|
|
|
|
assert(m_entered == m_isPrimary);
|
|
|
|
|
delete m_screen;
|
|
|
|
|
LOG((CLOG_DEBUG "closed display"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Screen::enable() {
|
|
|
|
|
assert(!m_enabled);
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
m_screen->updateKeyMap();
|
|
|
|
|
m_screen->updateKeyState();
|
|
|
|
|
m_screen->enable();
|
|
|
|
|
if (m_isPrimary) {
|
|
|
|
|
enablePrimary();
|
|
|
|
|
} else {
|
|
|
|
|
enableSecondary();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// note activation
|
|
|
|
|
m_enabled = true;
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::disable() {
|
|
|
|
|
assert(m_enabled);
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
if (!m_isPrimary && m_entered) {
|
|
|
|
|
leave();
|
|
|
|
|
} else if (m_isPrimary && !m_entered) {
|
|
|
|
|
enter(0);
|
|
|
|
|
}
|
|
|
|
|
m_screen->disable();
|
|
|
|
|
if (m_isPrimary) {
|
|
|
|
|
disablePrimary();
|
|
|
|
|
} else {
|
|
|
|
|
disableSecondary();
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// note deactivation
|
|
|
|
|
m_enabled = false;
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::enter(KeyModifierMask toggleMask) {
|
|
|
|
|
assert(m_entered == false);
|
|
|
|
|
LOG((CLOG_INFO "entering screen"));
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// now on screen
|
|
|
|
|
m_entered = true;
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
m_screen->enter();
|
|
|
|
|
if (m_isPrimary) {
|
|
|
|
|
enterPrimary();
|
|
|
|
|
} else {
|
|
|
|
|
enterSecondary(toggleMask);
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
bool Screen::leave() {
|
|
|
|
|
assert(m_entered == true);
|
|
|
|
|
LOG((CLOG_INFO "leaving screen"));
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
if (!m_screen->leave()) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (m_isPrimary) {
|
|
|
|
|
leavePrimary();
|
|
|
|
|
} else {
|
|
|
|
|
leaveSecondary();
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// make sure our idea of clipboard ownership is correct
|
|
|
|
|
m_screen->checkClipboards();
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// now not on screen
|
|
|
|
|
m_entered = false;
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
return true;
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::reconfigure(UInt32 activeSides) {
|
|
|
|
|
assert(m_isPrimary);
|
|
|
|
|
m_screen->reconfigure(activeSides);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::warpCursor(SInt32 x, SInt32 y) {
|
|
|
|
|
assert(m_isPrimary);
|
|
|
|
|
m_screen->warpCursor(x, y);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::setClipboard(ClipboardID id, const IClipboard *clipboard) {
|
|
|
|
|
m_screen->setClipboard(id, clipboard);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::grabClipboard(ClipboardID id) { m_screen->setClipboard(id, NULL); }
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::screensaver(bool) const {
|
|
|
|
|
// do nothing
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-16 13:36:44 +00:00
|
|
|
void Screen::keyDown(
|
|
|
|
|
KeyID id, KeyModifierMask mask, KeyButton button, const String &lang) {
|
2024-07-02 19:07:06 +00:00
|
|
|
// check for ctrl+alt+del emulation
|
|
|
|
|
if (id == kKeyDelete && (mask & (KeyModifierControl | KeyModifierAlt)) ==
|
|
|
|
|
(KeyModifierControl | KeyModifierAlt)) {
|
|
|
|
|
LOG((CLOG_DEBUG "emulating ctrl+alt+del press"));
|
|
|
|
|
if (m_screen->fakeCtrlAltDel()) {
|
|
|
|
|
return;
|
2016-12-28 11:50:32 +00:00
|
|
|
}
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
|
|
|
|
m_screen->fakeKeyDown(id, mask, button, lang);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-16 13:36:44 +00:00
|
|
|
void Screen::keyRepeat(
|
|
|
|
|
KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button,
|
|
|
|
|
const String &lang) {
|
2024-07-02 19:07:06 +00:00
|
|
|
assert(!m_isPrimary);
|
|
|
|
|
m_screen->fakeKeyRepeat(id, mask, count, button, lang);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::keyUp(KeyID, KeyModifierMask, KeyButton button) {
|
|
|
|
|
m_screen->fakeKeyUp(button);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::mouseDown(ButtonID button) {
|
|
|
|
|
m_screen->fakeMouseButton(button, true);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::mouseUp(ButtonID button) {
|
|
|
|
|
m_screen->fakeMouseButton(button, false);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::mouseMove(SInt32 x, SInt32 y) {
|
|
|
|
|
assert(!m_isPrimary);
|
|
|
|
|
m_screen->fakeMouseMove(x, y);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::mouseRelativeMove(SInt32 dx, SInt32 dy) {
|
|
|
|
|
assert(!m_isPrimary);
|
|
|
|
|
m_screen->fakeMouseRelativeMove(dx, dy);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::mouseWheel(SInt32 xDelta, SInt32 yDelta) const {
|
|
|
|
|
assert(!m_isPrimary);
|
|
|
|
|
m_screen->fakeMouseWheel(xDelta, yDelta);
|
|
|
|
|
}
|
2013-09-25 12:37:27 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::resetOptions() {
|
|
|
|
|
// reset options
|
|
|
|
|
m_halfDuplex = 0;
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// let screen handle its own options
|
|
|
|
|
m_screen->resetOptions();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::setOptions(const OptionsList &options) {
|
|
|
|
|
// update options
|
|
|
|
|
for (UInt32 i = 0, n = (UInt32)options.size(); i < n; i += 2) {
|
|
|
|
|
if (options[i] == kOptionHalfDuplexCapsLock) {
|
|
|
|
|
if (options[i + 1] != 0) {
|
|
|
|
|
m_halfDuplex |= KeyModifierCapsLock;
|
|
|
|
|
} else {
|
|
|
|
|
m_halfDuplex &= ~KeyModifierCapsLock;
|
|
|
|
|
}
|
2024-07-16 13:36:44 +00:00
|
|
|
LOG(
|
|
|
|
|
(CLOG_DEBUG1 "half-duplex caps-lock %s",
|
2024-07-02 19:07:06 +00:00
|
|
|
((m_halfDuplex & KeyModifierCapsLock) != 0) ? "on" : "off"));
|
|
|
|
|
} else if (options[i] == kOptionHalfDuplexNumLock) {
|
|
|
|
|
if (options[i + 1] != 0) {
|
|
|
|
|
m_halfDuplex |= KeyModifierNumLock;
|
|
|
|
|
} else {
|
|
|
|
|
m_halfDuplex &= ~KeyModifierNumLock;
|
|
|
|
|
}
|
2024-07-16 13:36:44 +00:00
|
|
|
LOG(
|
|
|
|
|
(CLOG_DEBUG1 "half-duplex num-lock %s",
|
2024-07-02 19:07:06 +00:00
|
|
|
((m_halfDuplex & KeyModifierNumLock) != 0) ? "on" : "off"));
|
|
|
|
|
} else if (options[i] == kOptionHalfDuplexScrollLock) {
|
|
|
|
|
if (options[i + 1] != 0) {
|
|
|
|
|
m_halfDuplex |= KeyModifierScrollLock;
|
|
|
|
|
} else {
|
|
|
|
|
m_halfDuplex &= ~KeyModifierScrollLock;
|
|
|
|
|
}
|
2024-07-16 13:36:44 +00:00
|
|
|
LOG(
|
|
|
|
|
(CLOG_DEBUG1 "half-duplex scroll-lock %s",
|
2024-07-02 19:07:06 +00:00
|
|
|
((m_halfDuplex & KeyModifierScrollLock) != 0) ? "on" : "off"));
|
2016-12-28 11:50:32 +00:00
|
|
|
}
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// update half-duplex options
|
|
|
|
|
m_screen->setHalfDuplexMask(m_halfDuplex);
|
|
|
|
|
|
|
|
|
|
// let screen handle its own options
|
|
|
|
|
m_screen->setOptions(options);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::setSequenceNumber(UInt32 seqNum) {
|
|
|
|
|
m_screen->setSequenceNumber(seqNum);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
UInt32 Screen::registerHotKey(KeyID key, KeyModifierMask mask) {
|
|
|
|
|
return m_screen->registerHotKey(key, mask);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::unregisterHotKey(UInt32 id) { m_screen->unregisterHotKey(id); }
|
|
|
|
|
|
|
|
|
|
void Screen::fakeInputBegin() {
|
|
|
|
|
assert(!m_fakeInput);
|
|
|
|
|
|
|
|
|
|
m_fakeInput = true;
|
|
|
|
|
m_screen->fakeInputBegin();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::fakeInputEnd() {
|
|
|
|
|
assert(m_fakeInput);
|
|
|
|
|
|
|
|
|
|
m_fakeInput = false;
|
|
|
|
|
m_screen->fakeInputEnd();
|
2013-08-30 14:38:43 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
bool Screen::isOnScreen() const { return m_entered; }
|
|
|
|
|
|
|
|
|
|
bool Screen::isLockedToScreen() const {
|
|
|
|
|
// check for pressed mouse buttons
|
|
|
|
|
// HACK: commented out as it breaks new drag drop feature
|
|
|
|
|
UInt32 buttonID = 0;
|
|
|
|
|
|
|
|
|
|
if (m_screen->isAnyMouseButtonDown(buttonID)) {
|
|
|
|
|
if (buttonID != kButtonLeft) {
|
|
|
|
|
LOG((CLOG_DEBUG "locked by mouse buttonID: %d", buttonID));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_enableDragDrop) {
|
|
|
|
|
return (buttonID == kButtonLeft) ? false : true;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// not locked
|
|
|
|
|
return false;
|
2013-09-24 16:29:51 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
SInt32 Screen::getJumpZoneSize() const {
|
|
|
|
|
if (!m_isPrimary) {
|
|
|
|
|
return 0;
|
|
|
|
|
} else {
|
|
|
|
|
return m_screen->getJumpZoneSize();
|
|
|
|
|
}
|
2013-08-30 14:38:43 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::getCursorCenter(SInt32 &x, SInt32 &y) const {
|
|
|
|
|
m_screen->getCursorCenter(x, y);
|
2013-08-30 14:38:43 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
KeyModifierMask Screen::getActiveModifiers() const {
|
|
|
|
|
return m_screen->getActiveModifiers();
|
2013-09-25 12:37:27 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
KeyModifierMask Screen::pollActiveModifiers() const {
|
|
|
|
|
return m_screen->pollActiveModifiers();
|
2013-08-23 15:36:23 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
bool Screen::isDraggingStarted() const { return m_screen->isDraggingStarted(); }
|
|
|
|
|
|
|
|
|
|
bool Screen::isFakeDraggingStarted() const {
|
|
|
|
|
return m_screen->isFakeDraggingStarted();
|
2014-03-17 13:10:29 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::setDraggingStarted(bool started) {
|
|
|
|
|
m_screen->setDraggingStarted(started);
|
2013-08-30 14:38:43 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::startDraggingFiles(DragFileList &fileList) {
|
|
|
|
|
m_screen->fakeDraggingFiles(fileList);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::setEnableDragDrop(bool enabled) { m_enableDragDrop = enabled; }
|
|
|
|
|
|
|
|
|
|
String &Screen::getDraggingFilename() const {
|
|
|
|
|
return m_screen->getDraggingFilename();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::clearDraggingFilename() { m_screen->clearDraggingFilename(); }
|
|
|
|
|
|
|
|
|
|
const String &Screen::getDropTarget() const {
|
|
|
|
|
return m_screen->getDropTarget();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void *Screen::getEventTarget() const { return m_screen; }
|
|
|
|
|
|
|
|
|
|
bool Screen::getClipboard(ClipboardID id, IClipboard *clipboard) const {
|
|
|
|
|
return m_screen->getClipboard(id, clipboard);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::getShape(SInt32 &x, SInt32 &y, SInt32 &w, SInt32 &h) const {
|
|
|
|
|
m_screen->getShape(x, y, w, h);
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::getCursorPos(SInt32 &x, SInt32 &y) const {
|
|
|
|
|
m_screen->getCursorPos(x, y);
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::enablePrimary() {
|
|
|
|
|
// get notified of screen saver activation/deactivation
|
|
|
|
|
m_screen->openScreensaver(true);
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
// claim screen changed size
|
|
|
|
|
m_events->addEvent(
|
|
|
|
|
Event(m_events->forIScreen().shapeChanged(), getEventTarget()));
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::enableSecondary() {
|
|
|
|
|
// assume primary has all clipboards
|
|
|
|
|
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
|
|
|
|
grabClipboard(id);
|
|
|
|
|
}
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::disablePrimary() {
|
|
|
|
|
// done with screen saver
|
|
|
|
|
m_screen->closeScreensaver();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::disableSecondary() {
|
|
|
|
|
// done with screen saver
|
|
|
|
|
m_screen->closeScreensaver();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::enterPrimary() {
|
|
|
|
|
// do nothing
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::enterSecondary(KeyModifierMask) {
|
|
|
|
|
// do nothing
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::leavePrimary() {
|
|
|
|
|
// we don't track keys while on the primary screen so update our
|
|
|
|
|
// idea of them now. this is particularly to update the state of
|
|
|
|
|
// the toggle modifiers.
|
|
|
|
|
m_screen->updateKeyState();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
2014-11-11 17:45:24 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void Screen::leaveSecondary() {
|
|
|
|
|
// release any keys we think are still down
|
|
|
|
|
m_screen->fakeAllKeysUp();
|
2021-06-29 10:20:56 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
String Screen::getSecureInputApp() const {
|
|
|
|
|
return m_screen->getSecureInputApp();
|
2014-11-11 17:45:24 +00:00
|
|
|
}
|
2024-07-02 19:07:06 +00:00
|
|
|
|
|
|
|
|
} // namespace synergy
|