rebranding symless/synergy to debauchee/barrier

This commit is contained in:
walker0643
2018-01-27 16:48:17 -05:00
parent 5a1c217b54
commit f12bfdfedc
702 changed files with 4732 additions and 4727 deletions

View File

@@ -1,4 +1,4 @@
# synergy -- mouse and keyboard sharing utility
# barrier -- mouse and keyboard sharing utility
# Copyright (C) 2012-2016 Symless Ltd.
# Copyright (C) 2009 Nick Bolton
#
@@ -25,7 +25,7 @@ elseif (UNIX)
file(GLOB sources "XWindows*.cpp")
endif()
if (SYNERGY_ADD_HEADERS)
if (BARRIER_ADD_HEADERS)
list(APPEND sources ${headers})
endif()

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
#pragma once
#include "synergy/KeyState.h"
#include "barrier/KeyState.h"
class IOSXKeyResource : public IInterface {
public:

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -86,7 +86,7 @@ MSWindowsClipboard::empty()
return false;
}
// mark clipboard as being owned by synergy
// mark clipboard as being owned by barrier
HGLOBAL data = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, 1);
if (NULL == SetClipboardData(getOwnershipFormat(), data)) {
LOG((CLOG_DEBUG "failed to set clipboard data"));
@@ -210,11 +210,11 @@ MSWindowsClipboard::clearConverters()
}
bool
MSWindowsClipboard::isOwnedBySynergy()
MSWindowsClipboard::isOwnedByBarrier()
{
// create ownership format if we haven't yet
if (s_ownershipFormat == 0) {
s_ownershipFormat = RegisterClipboardFormat(TEXT("SynergyOwnership"));
s_ownershipFormat = RegisterClipboardFormat(TEXT("BarrierOwnership"));
}
return (IsClipboardFormatAvailable(getOwnershipFormat()) != 0);
}
@@ -224,7 +224,7 @@ MSWindowsClipboard::getOwnershipFormat()
{
// create ownership format if we haven't yet
if (s_ownershipFormat == 0) {
s_ownershipFormat = RegisterClipboardFormat(TEXT("SynergyOwnership"));
s_ownershipFormat = RegisterClipboardFormat(TEXT("BarrierOwnership"));
}
// return the format

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -19,7 +19,7 @@
#pragma once
#include "platform/MSWindowsClipboardFacade.h"
#include "synergy/IClipboard.h"
#include "barrier/IClipboard.h"
#include "common/stdvector.h"
#define WIN32_LEAN_AND_MEAN
@@ -41,17 +41,17 @@ public:
This must be called between a successful open() and close().
Return false if the clipboard ownership could not be taken;
the clipboard should not be emptied in this case. Unlike
empty(), isOwnedBySynergy() will return false when emptied
this way. This is useful when synergy wants to put data on
empty(), isOwnedByBarrier() will return false when emptied
this way. This is useful when barrier wants to put data on
clipboard but pretend (to itself) that some other app did it.
When using empty(), synergy assumes the data came from the
When using empty(), barrier assumes the data came from the
server and doesn't need to be sent back. emptyUnowned()
makes synergy send the data to the server.
makes barrier send the data to the server.
*/
bool emptyUnowned();
//! Test if clipboard is owned by synergy
static bool isOwnedBySynergy();
//! Test if clipboard is owned by barrier
static bool isOwnedByBarrier();
// IClipboard overrides
virtual bool empty();

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -20,7 +20,7 @@
#include "platform/IMSWindowsClipboardFacade.h"
#include "synergy/IClipboard.h"
#include "barrier/IClipboard.h"
class MSWindowsClipboardFacade : public IMSWindowsClipboardFacade
{

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -63,11 +63,11 @@ MSWindowsClipboardHTMLConverter::doFromIClipboard(const String& data) const
UInt32 EndHTML = EndFragment + (UInt32)suffix.size();
prefix.replace(prefix.find("XXXXXXXXXX"), 10,
synergy::string::sprintf("%010u", StartFragment));
barrier::string::sprintf("%010u", StartFragment));
prefix.replace(prefix.find("YYYYYYYYYY"), 10,
synergy::string::sprintf("%010u", EndFragment));
barrier::string::sprintf("%010u", EndFragment));
prefix.replace(prefix.find("ZZZZZZZZZZ"), 10,
synergy::string::sprintf("%010u", EndHTML));
barrier::string::sprintf("%010u", EndHTML));
// concatenate
prefix += data;

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2012 Nick Bolton
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2012 Nick Bolton
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -20,8 +20,8 @@
#include "synwinhk/synwinhk.h"
#include "platform/MSWindowsScreen.h"
#include "synergy/IScreenSaver.h"
#include "synergy/XScreen.h"
#include "barrier/IScreenSaver.h"
#include "barrier/XScreen.h"
#include "mt/Lock.h"
#include "mt/Thread.h"
#include "arch/win32/ArchMiscWindows.h"
@@ -64,29 +64,29 @@
#endif
// <unused>; <unused>
#define SYNERGY_MSG_SWITCH SYNERGY_HOOK_LAST_MSG + 1
#define BARRIER_MSG_SWITCH BARRIER_HOOK_LAST_MSG + 1
// <unused>; <unused>
#define SYNERGY_MSG_ENTER SYNERGY_HOOK_LAST_MSG + 2
#define BARRIER_MSG_ENTER BARRIER_HOOK_LAST_MSG + 2
// <unused>; <unused>
#define SYNERGY_MSG_LEAVE SYNERGY_HOOK_LAST_MSG + 3
#define BARRIER_MSG_LEAVE BARRIER_HOOK_LAST_MSG + 3
// wParam = flags, HIBYTE(lParam) = virtual key, LOBYTE(lParam) = scan code
#define SYNERGY_MSG_FAKE_KEY SYNERGY_HOOK_LAST_MSG + 4
#define BARRIER_MSG_FAKE_KEY BARRIER_HOOK_LAST_MSG + 4
// flags, XBUTTON id
#define SYNERGY_MSG_FAKE_BUTTON SYNERGY_HOOK_LAST_MSG + 5
#define BARRIER_MSG_FAKE_BUTTON BARRIER_HOOK_LAST_MSG + 5
// x; y
#define SYNERGY_MSG_FAKE_MOVE SYNERGY_HOOK_LAST_MSG + 6
#define BARRIER_MSG_FAKE_MOVE BARRIER_HOOK_LAST_MSG + 6
// xDelta; yDelta
#define SYNERGY_MSG_FAKE_WHEEL SYNERGY_HOOK_LAST_MSG + 7
#define BARRIER_MSG_FAKE_WHEEL BARRIER_HOOK_LAST_MSG + 7
// POINT*; <unused>
#define SYNERGY_MSG_CURSOR_POS SYNERGY_HOOK_LAST_MSG + 8
#define BARRIER_MSG_CURSOR_POS BARRIER_HOOK_LAST_MSG + 8
// IKeyState*; <unused>
#define SYNERGY_MSG_SYNC_KEYS SYNERGY_HOOK_LAST_MSG + 9
#define BARRIER_MSG_SYNC_KEYS BARRIER_HOOK_LAST_MSG + 9
// install; <unused>
#define SYNERGY_MSG_SCREENSAVER SYNERGY_HOOK_LAST_MSG + 10
#define BARRIER_MSG_SCREENSAVER BARRIER_HOOK_LAST_MSG + 10
// dx; dy
#define SYNERGY_MSG_FAKE_REL_MOVE SYNERGY_HOOK_LAST_MSG + 11
#define BARRIER_MSG_FAKE_REL_MOVE BARRIER_HOOK_LAST_MSG + 11
// enable; <unused>
#define SYNERGY_MSG_FAKE_INPUT SYNERGY_HOOK_LAST_MSG + 12
#define BARRIER_MSG_FAKE_INPUT BARRIER_HOOK_LAST_MSG + 12
//
// MSWindowsDesks
@@ -170,13 +170,13 @@ MSWindowsDesks::disable()
void
MSWindowsDesks::enter()
{
sendMessage(SYNERGY_MSG_ENTER, 0, 0);
sendMessage(BARRIER_MSG_ENTER, 0, 0);
}
void
MSWindowsDesks::leave(HKL keyLayout)
{
sendMessage(SYNERGY_MSG_LEAVE, (WPARAM)keyLayout, 0);
sendMessage(BARRIER_MSG_LEAVE, (WPARAM)keyLayout, 0);
}
void
@@ -199,7 +199,7 @@ MSWindowsDesks::setOptions(const OptionsList& options)
void
MSWindowsDesks::updateKeys()
{
sendMessage(SYNERGY_MSG_SYNC_KEYS, 0, 0);
sendMessage(BARRIER_MSG_SYNC_KEYS, 0, 0);
}
void
@@ -221,27 +221,27 @@ MSWindowsDesks::installScreensaverHooks(bool install)
{
if (m_isPrimary && m_screensaverNotify != install) {
m_screensaverNotify = install;
sendMessage(SYNERGY_MSG_SCREENSAVER, install, 0);
sendMessage(BARRIER_MSG_SCREENSAVER, install, 0);
}
}
void
MSWindowsDesks::fakeInputBegin()
{
sendMessage(SYNERGY_MSG_FAKE_INPUT, 1, 0);
sendMessage(BARRIER_MSG_FAKE_INPUT, 1, 0);
}
void
MSWindowsDesks::fakeInputEnd()
{
sendMessage(SYNERGY_MSG_FAKE_INPUT, 0, 0);
sendMessage(BARRIER_MSG_FAKE_INPUT, 0, 0);
}
void
MSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
{
POINT pos;
sendMessage(SYNERGY_MSG_CURSOR_POS, reinterpret_cast<WPARAM>(&pos), 0);
sendMessage(BARRIER_MSG_CURSOR_POS, reinterpret_cast<WPARAM>(&pos), 0);
x = pos.x;
y = pos.y;
}
@@ -259,7 +259,7 @@ MSWindowsDesks::fakeKeyEvent(
if (!press) {
flags |= KEYEVENTF_KEYUP;
}
sendMessage(SYNERGY_MSG_FAKE_KEY, flags,
sendMessage(BARRIER_MSG_FAKE_KEY, flags,
MAKEWORD(static_cast<BYTE>(button & 0xffu),
static_cast<BYTE>(virtualKey & 0xffu)));
}
@@ -314,13 +314,13 @@ MSWindowsDesks::fakeMouseButton(ButtonID button, bool press)
}
// do it
sendMessage(SYNERGY_MSG_FAKE_BUTTON, flags, data);
sendMessage(BARRIER_MSG_FAKE_BUTTON, flags, data);
}
void
MSWindowsDesks::fakeMouseMove(SInt32 x, SInt32 y) const
{
sendMessage(SYNERGY_MSG_FAKE_MOVE,
sendMessage(BARRIER_MSG_FAKE_MOVE,
static_cast<WPARAM>(x),
static_cast<LPARAM>(y));
}
@@ -328,7 +328,7 @@ MSWindowsDesks::fakeMouseMove(SInt32 x, SInt32 y) const
void
MSWindowsDesks::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
{
sendMessage(SYNERGY_MSG_FAKE_REL_MOVE,
sendMessage(BARRIER_MSG_FAKE_REL_MOVE,
static_cast<WPARAM>(dx),
static_cast<LPARAM>(dy));
}
@@ -336,7 +336,7 @@ MSWindowsDesks::fakeMouseRelativeMove(SInt32 dx, SInt32 dy) const
void
MSWindowsDesks::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
{
sendMessage(SYNERGY_MSG_FAKE_WHEEL, xDelta, yDelta);
sendMessage(BARRIER_MSG_FAKE_WHEEL, xDelta, yDelta);
}
void
@@ -418,7 +418,7 @@ MSWindowsDesks::createDeskWindowClass(bool isPrimary) const
classInfo.hCursor = m_cursor;
classInfo.hbrBackground = NULL;
classInfo.lpszMenuName = NULL;
classInfo.lpszClassName = "SynergyDesk";
classInfo.lpszClassName = "BarrierDesk";
classInfo.hIconSm = NULL;
return RegisterClassEx(&classInfo);
}
@@ -513,7 +513,7 @@ MSWindowsDesks::deskMouseRelativeMove(SInt32 dx, SInt32 dy) const
// restore acceleration. there's a slight chance we'll end up in
// the wrong place if the user moves the cursor using this system's
// mouse while simultaneously moving the mouse on the server
// system. that defeats the purpose of synergy so we'll assume
// system. that defeats the purpose of barrier so we'll assume
// that won't happen. even if it does, the next mouse move will
// correct the position.
@@ -601,7 +601,7 @@ MSWindowsDesks::deskLeave(Desk* desk, HKL keyLayout)
// if not using low-level hooks we have to also activate the
// window to ensure we don't lose keyboard focus.
// FIXME -- see if this can be avoided. if so then always
// disable the window (see handling of SYNERGY_MSG_SWITCH).
// disable the window (see handling of BARRIER_MSG_SWITCH).
if (!desk->m_lowLevel) {
SetActiveWindow(desk->m_window);
}
@@ -666,7 +666,7 @@ MSWindowsDesks::deskThread(void* vdesk)
// create a window. we use this window to hide the cursor.
try {
desk->m_window = createWindow(m_deskClass, "SynergyDesk");
desk->m_window = createWindow(m_deskClass, "BarrierDesk");
LOG((CLOG_DEBUG "desk %s window is 0x%08x", desk->m_name.c_str(), desk->m_window));
}
catch (...) {
@@ -689,7 +689,7 @@ MSWindowsDesks::deskThread(void* vdesk)
DispatchMessage(&msg);
continue;
case SYNERGY_MSG_SWITCH:
case BARRIER_MSG_SWITCH:
if (m_isPrimary && !m_noHooks) {
m_uninstall();
if (m_screensaverNotify) {
@@ -718,45 +718,45 @@ MSWindowsDesks::deskThread(void* vdesk)
}
break;
case SYNERGY_MSG_ENTER:
case BARRIER_MSG_ENTER:
m_isOnScreen = true;
deskEnter(desk);
break;
case SYNERGY_MSG_LEAVE:
case BARRIER_MSG_LEAVE:
m_isOnScreen = false;
m_keyLayout = (HKL)msg.wParam;
deskLeave(desk, m_keyLayout);
break;
case SYNERGY_MSG_FAKE_KEY:
case BARRIER_MSG_FAKE_KEY:
keybd_event(HIBYTE(msg.lParam), LOBYTE(msg.lParam), (DWORD)msg.wParam, 0);
break;
case SYNERGY_MSG_FAKE_BUTTON:
case BARRIER_MSG_FAKE_BUTTON:
if (msg.wParam != 0) {
mouse_event((DWORD)msg.wParam, 0, 0, (DWORD)msg.lParam, 0);
}
break;
case SYNERGY_MSG_FAKE_MOVE:
case BARRIER_MSG_FAKE_MOVE:
deskMouseMove(static_cast<SInt32>(msg.wParam),
static_cast<SInt32>(msg.lParam));
break;
case SYNERGY_MSG_FAKE_REL_MOVE:
case BARRIER_MSG_FAKE_REL_MOVE:
deskMouseRelativeMove(static_cast<SInt32>(msg.wParam),
static_cast<SInt32>(msg.lParam));
break;
case SYNERGY_MSG_FAKE_WHEEL:
case BARRIER_MSG_FAKE_WHEEL:
// XXX -- add support for x-axis scrolling
if (msg.lParam != 0) {
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, (DWORD)msg.lParam, 0);
}
break;
case SYNERGY_MSG_CURSOR_POS: {
case BARRIER_MSG_CURSOR_POS: {
POINT* pos = reinterpret_cast<POINT*>(msg.wParam);
if (!GetCursorPos(pos)) {
pos->x = m_xCenter;
@@ -765,11 +765,11 @@ MSWindowsDesks::deskThread(void* vdesk)
break;
}
case SYNERGY_MSG_SYNC_KEYS:
case BARRIER_MSG_SYNC_KEYS:
m_updateKeys->run();
break;
case SYNERGY_MSG_SCREENSAVER:
case BARRIER_MSG_SCREENSAVER:
if (!m_noHooks) {
if (msg.wParam != 0) {
m_installScreensaver();
@@ -780,9 +780,9 @@ MSWindowsDesks::deskThread(void* vdesk)
}
break;
case SYNERGY_MSG_FAKE_INPUT:
keybd_event(SYNERGY_HOOK_FAKE_INPUT_VIRTUAL_KEY,
SYNERGY_HOOK_FAKE_INPUT_SCANCODE,
case BARRIER_MSG_FAKE_INPUT:
keybd_event(BARRIER_HOOK_FAKE_INPUT_VIRTUAL_KEY,
BARRIER_HOOK_FAKE_INPUT_SCANCODE,
msg.wParam ? 0 : KEYEVENTF_KEYUP, 0);
break;
}
@@ -868,7 +868,7 @@ MSWindowsDesks::checkDesk()
// show cursor on previous desk
bool wasOnScreen = m_isOnScreen;
if (!wasOnScreen) {
sendMessage(SYNERGY_MSG_ENTER, 0, 0);
sendMessage(BARRIER_MSG_ENTER, 0, 0);
}
// check for desk accessibility change. we don't get events
@@ -891,11 +891,11 @@ MSWindowsDesks::checkDesk()
// switch desk
m_activeDesk = desk;
m_activeDeskName = name;
sendMessage(SYNERGY_MSG_SWITCH, 0, 0);
sendMessage(BARRIER_MSG_SWITCH, 0, 0);
// hide cursor on new desk
if (!wasOnScreen) {
sendMessage(SYNERGY_MSG_LEAVE, (WPARAM)m_keyLayout, 0);
sendMessage(BARRIER_MSG_LEAVE, (WPARAM)m_keyLayout, 0);
}
// update keys if necessary
@@ -905,7 +905,7 @@ MSWindowsDesks::checkDesk()
}
else if (name != m_activeDeskName) {
// screen saver might have started
PostThreadMessage(m_threadID, SYNERGY_MSG_SCREEN_SAVER, TRUE, 0);
PostThreadMessage(m_threadID, BARRIER_MSG_SCREEN_SAVER, TRUE, 0);
}
}
@@ -937,7 +937,7 @@ MSWindowsDesks::handleCheckDesk(const Event&, void*)
if (m_isPrimary) {
BOOL running;
SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, &running, FALSE);
PostThreadMessage(m_threadID, SYNERGY_MSG_SCREEN_SAVER, running, 0);
PostThreadMessage(m_threadID, BARRIER_MSG_SCREEN_SAVER, running, 0);
}
}

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -19,9 +19,9 @@
#pragma once
#include "synwinhk/synwinhk.h"
#include "synergy/key_types.h"
#include "synergy/mouse_types.h"
#include "synergy/option_types.h"
#include "barrier/key_types.h"
#include "barrier/mouse_types.h"
#include "barrier/option_types.h"
#include "mt/CondVar.h"
#include "mt/Mutex.h"
#include "base/String.h"
@@ -46,9 +46,9 @@ desk at a time, you can't switch desks if the thread has any hooks
installed or owns any windows, windows cannot exist on multiple
desks at once, etc. Basically, they're useless except for running
the login window or the screensaver, which is what they're used
for. Synergy must deal with them mainly because of the login
for. Barrier must deal with them mainly because of the login
window and screensaver but users can create their own desks and
synergy should work on those too.
barrier should work on those too.
This class encapsulates all the desk nastiness. Clients of this
object don't have to know anything about desks.

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -40,7 +40,7 @@ MSWindowsEventQueueBuffer::MSWindowsEventQueueBuffer(IEventQueue* events) :
m_thread = GetCurrentThreadId();
// create a message type for custom events
m_userEvent = RegisterWindowMessage("SYNERGY_USER_EVENT");
m_userEvent = RegisterWindowMessage("BARRIER_USER_EVENT");
// get message type for daemon quit
m_daemonQuit = ArchMiscWindows::getDaemonQuitMessage();

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2011 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#include "platform/MSWindowsHook.h"
#include "synergy/XScreen.h"
#include "barrier/XScreen.h"
#include "base/Log.h"
static const char* g_name = "synwinhk";

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2011 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
*
@@ -37,7 +37,7 @@
// MSWindowsKeyState
//
// map virtual keys to synergy key enumeration
// map virtual keys to barrier key enumeration
const KeyID MSWindowsKeyState::s_virtualKey[] =
{
/* 0x000 */ { kKeyNone }, // reserved
@@ -593,7 +593,7 @@ MSWindowsKeyState::MSWindowsKeyState(
}
MSWindowsKeyState::MSWindowsKeyState(
MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap) :
MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, barrier::KeyMap& keyMap) :
KeyState(events, keyMap),
m_eventTarget(eventTarget),
m_desks(desks),
@@ -922,7 +922,7 @@ MSWindowsKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
}
void
MSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
MSWindowsKeyState::getKeyMap(barrier::KeyMap& keyMap)
{
// update keyboard groups
if (getGroups(m_groups)) {
@@ -938,7 +938,7 @@ MSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
memset(m_virtualKeyToButton, 0, sizeof(m_virtualKeyToButton));
m_keyToVKMap.clear();
synergy::KeyMap::KeyItem item;
barrier::KeyMap::KeyItem item;
SInt32 numGroups = (SInt32)m_groups.size();
for (SInt32 g = 0; g < numGroups; ++g) {
item.m_group = g;
@@ -1117,7 +1117,7 @@ MSWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
item.m_client = m_buttonToVK[i];
// get flags for modifier keys
synergy::KeyMap::initModifierKey(item);
barrier::KeyMap::initModifierKey(item);
if (item.m_id == 0) {
// translate virtual key to a character with and without
@@ -1365,7 +1365,7 @@ MSWindowsKeyState::mapButtonToVirtualKey(KeyButton button) const
}
KeyID
MSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
MSWindowsKeyState::getIDForKey(barrier::KeyMap::KeyItem& item,
KeyButton button, UINT virtualKey,
PBYTE keyState, HKL hkl) const
{
@@ -1377,7 +1377,7 @@ MSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
switch (n) {
case -1:
return synergy::KeyMap::getDeadKey(id);
return barrier::KeyMap::getDeadKey(id);
default:
case 0:
@@ -1396,7 +1396,7 @@ MSWindowsKeyState::getIDForKey(synergy::KeyMap::KeyItem& item,
}
void
MSWindowsKeyState::addKeyEntry(synergy::KeyMap& keyMap, synergy::KeyMap::KeyItem& item)
MSWindowsKeyState::addKeyEntry(barrier::KeyMap& keyMap, barrier::KeyMap::KeyItem& item)
{
keyMap.addKeyEntry(item);
if (item.m_group == 0) {

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#pragma once
#include "synergy/KeyState.h"
#include "barrier/KeyState.h"
#include "base/String.h"
#include "common/stdvector.h"
@@ -37,7 +37,7 @@ This class maps KeyIDs to keystrokes.
class MSWindowsKeyState : public KeyState {
public:
MSWindowsKeyState(MSWindowsDesks* desks, void* eventTarget, IEventQueue* events);
MSWindowsKeyState(MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, synergy::KeyMap& keyMap);
MSWindowsKeyState(MSWindowsDesks* desks, void* eventTarget, IEventQueue* events, barrier::KeyMap& keyMap);
virtual ~MSWindowsKeyState();
//! @name manipulators
@@ -161,7 +161,7 @@ public:
protected:
// KeyState overrides
virtual void getKeyMap(synergy::KeyMap& keyMap);
virtual void getKeyMap(barrier::KeyMap& keyMap);
virtual void fakeKey(const Keystroke& keystroke);
virtual KeyModifierMask&
getActiveModifiersRValue();
@@ -175,11 +175,11 @@ private:
bool getGroups(GroupList&) const;
void setWindowGroup(SInt32 group);
KeyID getIDForKey(synergy::KeyMap::KeyItem& item,
KeyID getIDForKey(barrier::KeyMap::KeyItem& item,
KeyButton button, UINT virtualKey,
PBYTE keyState, HKL hkl) const;
void addKeyEntry(synergy::KeyMap& keyMap, synergy::KeyMap::KeyItem& item);
void addKeyEntry(barrier::KeyMap& keyMap, barrier::KeyMap::KeyItem& item);
void init();

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -25,12 +25,12 @@
#include "platform/MSWindowsEventQueueBuffer.h"
#include "platform/MSWindowsKeyState.h"
#include "platform/MSWindowsScreenSaver.h"
#include "synergy/Clipboard.h"
#include "synergy/KeyMap.h"
#include "synergy/XScreen.h"
#include "synergy/App.h"
#include "synergy/ArgsBase.h"
#include "synergy/ClientApp.h"
#include "barrier/Clipboard.h"
#include "barrier/KeyMap.h"
#include "barrier/XScreen.h"
#include "barrier/App.h"
#include "barrier/ArgsBase.h"
#include "barrier/ClientApp.h"
#include "mt/Lock.h"
#include "mt/Thread.h"
#include "arch/win32/ArchMiscWindows.h"
@@ -146,7 +146,7 @@ MSWindowsScreen::MSWindowsScreen(
updateScreenShape();
m_class = createWindowClass();
m_window = createWindow(m_class, "Synergy");
m_window = createWindow(m_class, "Barrier");
forceShowCursor();
LOG((CLOG_DEBUG "screen shape: %d,%d %dx%d %s", m_x, m_y, m_w, m_h, m_multimon ? "(multi-monitor)" : ""));
LOG((CLOG_DEBUG "window is 0x%08x", m_window));
@@ -431,7 +431,7 @@ MSWindowsScreen::checkClipboards()
// next reboot we do this double check. clipboard ownership
// won't be reflected on other screens until we leave but at
// least the clipboard itself will work.
if (m_ownClipboard && !MSWindowsClipboard::isOwnedBySynergy()) {
if (m_ownClipboard && !MSWindowsClipboard::isOwnedByBarrier()) {
LOG((CLOG_DEBUG "clipboard changed: lost ownership and no notification received"));
m_ownClipboard = false;
sendClipboardEvent(m_events->forClipboard().clipboardGrabbed(), kClipboardClipboard);
@@ -553,8 +553,8 @@ MSWindowsScreen::warpCursor(SInt32 x, SInt32 y)
// remove all input events before and including warp
MSG msg;
while (PeekMessage(&msg, NULL, SYNERGY_MSG_INPUT_FIRST,
SYNERGY_MSG_INPUT_LAST, PM_REMOVE)) {
while (PeekMessage(&msg, NULL, BARRIER_MSG_INPUT_FIRST,
BARRIER_MSG_INPUT_LAST, PM_REMOVE)) {
// do nothing
}
@@ -638,11 +638,11 @@ MSWindowsScreen::registerHotKey(KeyID key, KeyModifierMask mask)
else {
m_oldHotKeyIDs.push_back(id);
m_hotKeys.erase(id);
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask));
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask));
return 0;
}
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
return id;
}
@@ -849,7 +849,7 @@ MSWindowsScreen::createWindowClass() const
classInfo.hCursor = NULL;
classInfo.hbrBackground = NULL;
classInfo.lpszMenuName = NULL;
classInfo.lpszClassName = "Synergy";
classInfo.lpszClassName = "Barrier";
classInfo.hIconSm = NULL;
return RegisterClassEx(&classInfo);
}
@@ -974,10 +974,10 @@ MSWindowsScreen::onPreDispatch(HWND hwnd,
{
// handle event
switch (message) {
case SYNERGY_MSG_SCREEN_SAVER:
case BARRIER_MSG_SCREEN_SAVER:
return onScreensaver(wParam != 0);
case SYNERGY_MSG_DEBUG:
case BARRIER_MSG_DEBUG:
LOG((CLOG_DEBUG1 "hook: 0x%08x 0x%08x", wParam, lParam));
return true;
}
@@ -997,24 +997,24 @@ MSWindowsScreen::onPreDispatchPrimary(HWND,
// handle event
switch (message) {
case SYNERGY_MSG_MARK:
case BARRIER_MSG_MARK:
return onMark(static_cast<UInt32>(wParam));
case SYNERGY_MSG_KEY:
case BARRIER_MSG_KEY:
return onKey(wParam, lParam);
case SYNERGY_MSG_MOUSE_BUTTON:
case BARRIER_MSG_MOUSE_BUTTON:
return onMouseButton(wParam, lParam);
case SYNERGY_MSG_MOUSE_MOVE:
case BARRIER_MSG_MOUSE_MOVE:
return onMouseMove(static_cast<SInt32>(wParam),
static_cast<SInt32>(lParam));
case SYNERGY_MSG_MOUSE_WHEEL:
case BARRIER_MSG_MOUSE_WHEEL:
// XXX -- support x-axis scrolling
return onMouseWheel(0, static_cast<SInt32>(wParam));
case SYNERGY_MSG_PRE_WARP:
case BARRIER_MSG_PRE_WARP:
{
// save position to compute delta of next motion
saveMousePosition(static_cast<SInt32>(wParam), static_cast<SInt32>(lParam));
@@ -1026,13 +1026,13 @@ MSWindowsScreen::onPreDispatchPrimary(HWND,
// event.
MSG msg;
do {
GetMessage(&msg, NULL, SYNERGY_MSG_MOUSE_MOVE,
SYNERGY_MSG_POST_WARP);
} while (msg.message != SYNERGY_MSG_POST_WARP);
GetMessage(&msg, NULL, BARRIER_MSG_MOUSE_MOVE,
BARRIER_MSG_POST_WARP);
} while (msg.message != BARRIER_MSG_POST_WARP);
}
return true;
case SYNERGY_MSG_POST_WARP:
case BARRIER_MSG_POST_WARP:
LOG((CLOG_WARN "unmatched post warp"));
return true;
@@ -1337,7 +1337,7 @@ MSWindowsScreen::onMouseButton(WPARAM wParam, LPARAM lParam)
}
// here's how mouse movements are sent across the network to a client:
// 1. synergy checks the mouse position on server screen
// 1. barrier checks the mouse position on server screen
// 2. records the delta (current x,y minus last x,y)
// 3. records the current x,y as "last" (so we can calc delta next time)
// 4. on the server, puts the cursor back to the center of the screen
@@ -1430,14 +1430,14 @@ MSWindowsScreen::onScreensaver(bool activated)
// send SC_SCREENSAVE until the screen saver starts, even if
// the screen saver is disabled!
MSG msg;
if (PeekMessage(&msg, NULL, SYNERGY_MSG_SCREEN_SAVER,
SYNERGY_MSG_SCREEN_SAVER, PM_NOREMOVE)) {
if (PeekMessage(&msg, NULL, BARRIER_MSG_SCREEN_SAVER,
BARRIER_MSG_SCREEN_SAVER, PM_NOREMOVE)) {
return true;
}
if (activated) {
if (!m_screensaverActive &&
m_screensaver->checkStarted(SYNERGY_MSG_SCREEN_SAVER, FALSE, 0)) {
m_screensaver->checkStarted(BARRIER_MSG_SCREEN_SAVER, FALSE, 0)) {
m_screensaverActive = true;
sendEvent(m_events->forIPrimaryScreen().screensaverActivated());
@@ -1497,7 +1497,7 @@ MSWindowsScreen::onClipboardChange()
{
// now notify client that somebody changed the clipboard (unless
// we're the owner).
if (!MSWindowsClipboard::isOwnedBySynergy()) {
if (!MSWindowsClipboard::isOwnedByBarrier()) {
if (m_ownClipboard) {
LOG((CLOG_DEBUG "clipboard changed: lost ownership"));
m_ownClipboard = false;
@@ -1506,7 +1506,7 @@ MSWindowsScreen::onClipboardChange()
}
}
else if (!m_ownClipboard) {
LOG((CLOG_DEBUG "clipboard changed: synergy owned"));
LOG((CLOG_DEBUG "clipboard changed: barrier owned"));
m_ownClipboard = true;
}
@@ -1517,7 +1517,7 @@ void
MSWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
{
// send an event that we can recognize before the mouse warp
PostThreadMessage(GetCurrentThreadId(), SYNERGY_MSG_PRE_WARP, x, y);
PostThreadMessage(GetCurrentThreadId(), BARRIER_MSG_PRE_WARP, x, y);
// warp mouse. hopefully this inserts a mouse motion event
// between the previous message and the following message.
@@ -1565,7 +1565,7 @@ MSWindowsScreen::warpCursorNoFlush(SInt32 x, SInt32 y)
ARCH->sleep(0.0);
// send an event that we can recognize after the mouse warp
PostThreadMessage(GetCurrentThreadId(), SYNERGY_MSG_POST_WARP, 0, 0);
PostThreadMessage(GetCurrentThreadId(), BARRIER_MSG_POST_WARP, 0, 0);
}
void
@@ -1575,7 +1575,7 @@ MSWindowsScreen::nextMark()
++m_mark;
// mark point in message queue where the mark was changed
PostThreadMessage(GetCurrentThreadId(), SYNERGY_MSG_MARK, m_mark, 0);
PostThreadMessage(GetCurrentThreadId(), BARRIER_MSG_MARK, m_mark, 0);
}
bool

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -19,8 +19,8 @@
#pragma once
#include "platform/MSWindowsHook.h"
#include "synergy/PlatformScreen.h"
#include "synergy/DragInformation.h"
#include "barrier/PlatformScreen.h"
#include "barrier/DragInformation.h"
#include "synwinhk/synwinhk.h"
#include "mt/CondVar.h"
#include "mt/Mutex.h"

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#pragma once
#include "synergy/IScreenSaver.h"
#include "barrier/IScreenSaver.h"
#include "base/String.h"
#define WIN32_LEAN_AND_MEAN

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
#include "platform/MSWindowsSession.h"
#include "arch/win32/XArchWindows.h"
#include "synergy/XSynergy.h"
#include "barrier/XBarrier.h"
#include "base/Log.h"
#include <Wtsapi32.h>

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -52,8 +52,8 @@ MSWindowsUtil::getErrorString(HINSTANCE hinstance, DWORD error, DWORD id)
(LPTSTR)&buffer,
0,
NULL) == 0) {
String errorString = synergy::string::sprintf("%d", error);
return synergy::string::format(getString(hinstance, id).c_str(),
String errorString = barrier::string::sprintf("%d", error);
return barrier::string::format(getString(hinstance, id).c_str(),
errorString.c_str());
}
else {

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2009 Chris Schoeneman
*
@@ -22,8 +22,8 @@
#include "ipc/IpcServer.h"
#include "ipc/IpcMessage.h"
#include "ipc/Ipc.h"
#include "synergy/App.h"
#include "synergy/ArgsBase.h"
#include "barrier/App.h"
#include "barrier/ArgsBase.h"
#include "mt/Thread.h"
#include "arch/win32/ArchDaemonWindows.h"
#include "arch/win32/XArchWindows.h"
@@ -138,7 +138,7 @@ MSWindowsWatchdog::getUserToken(LPSECURITY_ATTRIBUTES security)
{
// always elevate if we are at the vista/7 login screen. we could also
// elevate for the uac dialog (consent.exe) but this would be pointless,
// since synergy would re-launch as non-elevated after the desk switch,
// since barrier would re-launch as non-elevated after the desk switch,
// and so would be unusable with the new elevated process taking focus.
if (m_elevateProcess
|| m_autoElevated
@@ -460,9 +460,9 @@ MSWindowsWatchdog::shutdownProcess(HANDLE handle, DWORD pid, int timeout)
double elapsed = (ARCH->time() - start);
if (elapsed > timeout) {
// if timeout reached, kill forcefully.
// calling TerminateProcess on synergy is very bad!
// calling TerminateProcess on barrier is very bad!
// it causes the hook DLL to stay loaded in some apps,
// making it impossible to start synergy again.
// making it impossible to start barrier again.
LOG((CLOG_WARN "shutdown timed out after %d secs, forcefully terminating", (int)elapsed));
TerminateProcess(handle, kExitSuccess);
break;
@@ -501,8 +501,8 @@ MSWindowsWatchdog::shutdownExistingProcesses()
// make sure we're not checking the system process
if (entry.th32ProcessID != 0) {
if (_stricmp(entry.szExeFile, "synergyc.exe") == 0 ||
_stricmp(entry.szExeFile, "synergys.exe") == 0) {
if (_stricmp(entry.szExeFile, "barrierc.exe") == 0 ||
_stricmp(entry.szExeFile, "barriers.exe") == 0) {
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, entry.th32ProcessID);
shutdownProcess(handle, entry.th32ProcessID, 10);

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2009 Chris Schoeneman
*
@@ -19,7 +19,7 @@
#pragma once
#include "platform/MSWindowsSession.h"
#include "synergy/XSynergy.h"
#include "barrier/XBarrier.h"
#include "arch/IArchMultithread.h"
#define WIN32_LEAN_AND_MEAN
@@ -87,9 +87,9 @@ private:
/*!
An error occured in the process watchdog.
*/
class XMSWindowsWatchdogError : public XSynergy {
class XMSWindowsWatchdogError : public XBarrier {
public:
XMSWindowsWatchdogError(const String& msg) : XSynergy(msg) { }
XMSWindowsWatchdogError(const String& msg) : XBarrier(msg) { }
// XBase overrides
virtual String getWhat() const throw() { return what(); }

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#include "platform/OSXClipboard.h"
#include "synergy/Clipboard.h"
#include "barrier/Clipboard.h"
#include "platform/OSXClipboardUTF16Converter.h"
#include "platform/OSXClipboardTextConverter.h"
#include "platform/OSXClipboardBMPConverter.h"

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#pragma once
#include "synergy/IClipboard.h"
#include "barrier/IClipboard.h"
#include <Carbon/Carbon.h>
#include <vector>
@@ -31,8 +31,8 @@ public:
OSXClipboard();
virtual ~OSXClipboard();
//! Test if clipboard is owned by synergy
static bool isOwnedBySynergy();
//! Test if clipboard is owned by barrier
static bool isOwnedByBarrier();
// IClipboard overrides
virtual bool empty();

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
* Patch by Ryan Chapman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -136,7 +136,7 @@ OSXKeyState::OSXKeyState(IEventQueue* events) :
init();
}
OSXKeyState::OSXKeyState(IEventQueue* events, synergy::KeyMap& keyMap) :
OSXKeyState::OSXKeyState(IEventQueue* events, barrier::KeyMap& keyMap) :
KeyState(events, keyMap)
{
init();
@@ -427,7 +427,7 @@ OSXKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
}
void
OSXKeyState::getKeyMap(synergy::KeyMap& keyMap)
OSXKeyState::getKeyMap(barrier::KeyMap& keyMap)
{
// update keyboard groups
if (getGroups(m_groups)) {
@@ -604,10 +604,10 @@ OSXKeyState::fakeKey(const Keystroke& keystroke)
}
void
OSXKeyState::getKeyMapForSpecialKeys(synergy::KeyMap& keyMap, SInt32 group) const
OSXKeyState::getKeyMapForSpecialKeys(barrier::KeyMap& keyMap, SInt32 group) const
{
// special keys are insensitive to modifers and none are dead keys
synergy::KeyMap::KeyItem item;
barrier::KeyMap::KeyItem item;
for (size_t i = 0; i < sizeof(s_controlKeys) /
sizeof(s_controlKeys[0]); ++i) {
const KeyEntry& entry = s_controlKeys[i];
@@ -618,7 +618,7 @@ OSXKeyState::getKeyMapForSpecialKeys(synergy::KeyMap& keyMap, SInt32 group) cons
item.m_sensitive = 0;
item.m_dead = false;
item.m_client = 0;
synergy::KeyMap::initModifierKey(item);
barrier::KeyMap::initModifierKey(item);
keyMap.addKeyEntry(item);
if (item.m_lock) {
@@ -635,7 +635,7 @@ OSXKeyState::getKeyMapForSpecialKeys(synergy::KeyMap& keyMap, SInt32 group) cons
}
bool
OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
OSXKeyState::getKeyMap(barrier::KeyMap& keyMap,
SInt32 group, const IOSXKeyResource& r) const
{
if (!r.isValid()) {
@@ -649,7 +649,7 @@ OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
std::vector<std::pair<KeyID, bool> > buttonKeys(r.getNumTables());
// iterate over each button
synergy::KeyMap::KeyItem item;
barrier::KeyMap::KeyItem item;
for (UInt32 i = 0; i < r.getNumButtons(); ++i) {
item.m_button = mapVirtualKeyToKeyButton(i);
@@ -659,7 +659,7 @@ OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
// convert the entry in each table for this button to a KeyID
for (UInt32 j = 0; j < r.getNumTables(); ++j) {
buttonKeys[j].first = r.getKey(j, i);
buttonKeys[j].second = synergy::KeyMap::isDeadKey(buttonKeys[j].first);
buttonKeys[j].second = barrier::KeyMap::isDeadKey(buttonKeys[j].first);
}
// iterate over each character table
@@ -682,7 +682,7 @@ OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
item.m_group = group;
item.m_dead = buttonKeys[j].second;
item.m_client = buttonKeys[j].second ? 1 : 0;
synergy::KeyMap::initModifierKey(item);
barrier::KeyMap::initModifierKey(item);
if (item.m_lock) {
// all locking keys are half duplex on OS X
keyMap.addHalfDuplexButton(i);
@@ -753,7 +753,7 @@ OSXKeyState::getKeyMap(synergy::KeyMap& keyMap,
}
bool
OSXKeyState::mapSynergyHotKeyToMac(KeyID key, KeyModifierMask mask,
OSXKeyState::mapBarrierHotKeyToMac(KeyID key, KeyModifierMask mask,
UInt32 &macVirtualKey, UInt32 &macModifierMask) const
{
// look up button for key

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#pragma once
#include "synergy/KeyState.h"
#include "barrier/KeyState.h"
#include "common/stdmap.h"
#include "common/stdset.h"
#include "common/stdvector.h"
@@ -37,7 +37,7 @@ public:
typedef std::vector<KeyID> KeyIDs;
OSXKeyState(IEventQueue* events);
OSXKeyState(IEventQueue* events, synergy::KeyMap& keyMap);
OSXKeyState(IEventQueue* events, barrier::KeyMap& keyMap);
virtual ~OSXKeyState();
//! @name modifiers
@@ -55,9 +55,9 @@ public:
//! @name accessors
//@{
//! Convert OS X modifier mask to synergy mask
//! Convert OS X modifier mask to barrier mask
/*!
Returns the synergy modifier mask corresponding to the OS X modifier
Returns the barrier modifier mask corresponding to the OS X modifier
mask in \p mask.
*/
KeyModifierMask mapModifiersFromOSX(UInt32 mask) const;
@@ -84,7 +84,7 @@ public:
Calculates mac virtual key and mask for a key \p key and modifiers
\p mask. Returns \c true if the key can be mapped, \c false otherwise.
*/
bool mapSynergyHotKeyToMac(KeyID key, KeyModifierMask mask,
bool mapBarrierHotKeyToMac(KeyID key, KeyModifierMask mask,
UInt32& macVirtualKey,
UInt32& macModifierMask) const;
@@ -101,19 +101,19 @@ public:
CGEventFlags getModifierStateAsOSXFlags();
protected:
// KeyState overrides
virtual void getKeyMap(synergy::KeyMap& keyMap);
virtual void getKeyMap(barrier::KeyMap& keyMap);
virtual void fakeKey(const Keystroke& keystroke);
private:
class KeyResource;
typedef std::vector<KeyLayout> GroupList;
// Add hard coded special keys to a synergy::KeyMap.
// Add hard coded special keys to a barrier::KeyMap.
void getKeyMapForSpecialKeys(
synergy::KeyMap& keyMap, SInt32 group) const;
barrier::KeyMap& keyMap, SInt32 group) const;
// Convert keyboard resource to a key map
bool getKeyMap(synergy::KeyMap& keyMap,
bool getKeyMap(barrier::KeyMap& keyMap,
SInt32 group, const IOSXKeyResource& r) const;
// Get the available keyboard groups
@@ -157,7 +157,7 @@ private:
const bool postDown);
private:
// OS X uses a physical key if 0 for the 'A' key. synergy reserves
// OS X uses a physical key if 0 for the 'A' key. barrier reserves
// KeyButton 0 so we offset all OS X physical key ids by this much
// when used as a KeyButton and by minus this much to map a KeyButton
// to a physical button.

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless.
*
* This package is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#import <CoreFoundation/CoreFoundation.h>
#include "synergy/key_types.h"
#include "barrier/key_types.h"
#if defined(__cplusplus)
extern "C" {

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless.
*
* This package is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#import <CoreFoundation/CoreFoundation.h>
#import <Carbon/Carbon.h>
#include "synergy/key_types.h"
#include "barrier/key_types.h"
#if defined(__cplusplus)
extern "C" {

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2013-2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -19,8 +19,8 @@
#pragma once
#include "platform/OSXClipboard.h"
#include "synergy/PlatformScreen.h"
#include "synergy/DragInformation.h"
#include "barrier/PlatformScreen.h"
#include "barrier/DragInformation.h"
#include "base/EventTypes.h"
#include "common/stdmap.h"
#include "common/stdvector.h"
@@ -137,17 +137,17 @@ private:
void showCursor();
void hideCursor();
// map synergy mouse button to mac buttons
ButtonID mapSynergyButtonToMac(UInt16) const;
// map barrier mouse button to mac buttons
ButtonID mapBarrierButtonToMac(UInt16) const;
// map mac mouse button to synergy buttons
ButtonID mapMacButtonToSynergy(UInt16) const;
// map mac mouse button to barrier buttons
ButtonID mapMacButtonToBarrier(UInt16) const;
// map mac scroll wheel value to a synergy scroll wheel value
SInt32 mapScrollWheelToSynergy(SInt32) const;
// map mac scroll wheel value to a barrier scroll wheel value
SInt32 mapScrollWheelToBarrier(SInt32) const;
// map synergy scroll wheel value to a mac scroll wheel value
SInt32 mapScrollWheelFromSynergy(SInt32) const;
// map barrier scroll wheel value to a mac scroll wheel value
SInt32 mapScrollWheelFromBarrier(SInt32) const;
// get the current scroll wheel speed
double getScrollSpeed() const;

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -27,9 +27,9 @@
#include "platform/OSXDragSimulator.h"
#include "platform/OSXMediaKeySupport.h"
#include "platform/OSXPasteboardPeeker.h"
#include "synergy/Clipboard.h"
#include "synergy/KeyMap.h"
#include "synergy/ClientApp.h"
#include "barrier/Clipboard.h"
#include "barrier/KeyMap.h"
#include "barrier/ClientApp.h"
#include "mt/CondVar.h"
#include "mt/Lock.h"
#include "mt/Mutex.h"
@@ -48,9 +48,9 @@
// This isn't in any Apple SDK that I know of as of yet.
enum {
kSynergyEventMouseScroll = 11,
kSynergyMouseScrollAxisX = 'saxx',
kSynergyMouseScrollAxisY = 'saxy'
kBarrierEventMouseScroll = 11,
kBarrierMouseScrollAxisX = 'saxx',
kBarrierMouseScrollAxisY = 'saxy'
};
enum {
@@ -319,9 +319,9 @@ OSXScreen::getCursorCenter(SInt32& x, SInt32& y) const
UInt32
OSXScreen::registerHotKey(KeyID key, KeyModifierMask mask)
{
// get mac virtual key and modifier mask matching synergy key and mask
// get mac virtual key and modifier mask matching barrier key and mask
UInt32 macKey, macMask;
if (!m_keyState->mapSynergyHotKeyToMac(key, mask, macKey, macMask)) {
if (!m_keyState->mapBarrierHotKeyToMac(key, mask, macKey, macMask)) {
LOG((CLOG_DEBUG "could not map hotkey id=%04x mask=%04x", key, mask));
return 0;
}
@@ -361,13 +361,13 @@ OSXScreen::registerHotKey(KeyID key, KeyModifierMask mask)
if (!okay) {
m_oldHotKeyIDs.push_back(id);
m_hotKeyToIDMap.erase(HotKeyItem(macKey, macMask));
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask));
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask));
return 0;
}
m_hotKeys.insert(std::make_pair(id, HotKeyItem(ref, macKey, macMask)));
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
return id;
}
@@ -510,7 +510,7 @@ void
OSXScreen::fakeMouseButton(ButtonID id, bool press)
{
// Buttons are indexed from one, but the button down array is indexed from zero
UInt32 index = mapSynergyButtonToMac(id) - kButtonLeft;
UInt32 index = mapBarrierButtonToMac(id) - kButtonLeft;
if (index >= NumButtonIDs) {
return;
}
@@ -676,8 +676,8 @@ OSXScreen::fakeMouseWheel(SInt32 xDelta, SInt32 yDelta) const
// is the right choice here over kCGScrollEventUnitPixel
CGEventRef scrollEvent = CGEventCreateScrollWheelEvent(
NULL, kCGScrollEventUnitLine, 2,
mapScrollWheelFromSynergy(yDelta),
-mapScrollWheelFromSynergy(xDelta));
mapScrollWheelFromBarrier(yDelta),
-mapScrollWheelFromBarrier(xDelta));
// Fix for sticky keys
CGEventFlags modifiers = m_keyState->getModifierStateAsOSXFlags();
@@ -999,7 +999,7 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
switch (eventClass) {
case kEventClassMouse:
switch (GetEventKind(*carbonEvent)) {
case kSynergyEventMouseScroll:
case kBarrierEventMouseScroll:
{
OSStatus r;
long xScroll;
@@ -1007,7 +1007,7 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
// get scroll amount
r = GetEventParameter(*carbonEvent,
kSynergyMouseScrollAxisX,
kBarrierMouseScrollAxisX,
typeSInt32,
NULL,
sizeof(xScroll),
@@ -1017,7 +1017,7 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
xScroll = 0;
}
r = GetEventParameter(*carbonEvent,
kSynergyMouseScrollAxisY,
kBarrierMouseScrollAxisY,
typeSInt32,
NULL,
sizeof(yScroll),
@@ -1028,8 +1028,8 @@ OSXScreen::handleSystemEvent(const Event& event, void*)
}
if (xScroll != 0 || yScroll != 0) {
onMouseWheel(-mapScrollWheelToSynergy(xScroll),
mapScrollWheelToSynergy(yScroll));
onMouseWheel(-mapScrollWheelToBarrier(xScroll),
mapScrollWheelToBarrier(yScroll));
}
}
}
@@ -1129,7 +1129,7 @@ bool
OSXScreen::onMouseButton(bool pressed, UInt16 macButton)
{
// Buttons 2 and 3 are inverted on the mac
ButtonID button = mapMacButtonToSynergy(macButton);
ButtonID button = mapMacButtonToBarrier(macButton);
if (pressed) {
LOG((CLOG_DEBUG1 "event: button press button=%d", button));
@@ -1389,7 +1389,7 @@ OSXScreen::onHotKey(EventRef event) const
}
ButtonID
OSXScreen::mapSynergyButtonToMac(UInt16 button) const
OSXScreen::mapBarrierButtonToMac(UInt16 button) const
{
switch (button) {
case 1:
@@ -1404,7 +1404,7 @@ OSXScreen::mapSynergyButtonToMac(UInt16 button) const
}
ButtonID
OSXScreen::mapMacButtonToSynergy(UInt16 macButton) const
OSXScreen::mapMacButtonToBarrier(UInt16 macButton) const
{
switch (macButton) {
case 1:
@@ -1421,7 +1421,7 @@ OSXScreen::mapMacButtonToSynergy(UInt16 macButton) const
}
SInt32
OSXScreen::mapScrollWheelToSynergy(SInt32 x) const
OSXScreen::mapScrollWheelToBarrier(SInt32 x) const
{
// return accelerated scrolling but not exponentially scaled as it is
// on the mac.
@@ -1430,7 +1430,7 @@ OSXScreen::mapScrollWheelToSynergy(SInt32 x) const
}
SInt32
OSXScreen::mapScrollWheelFromSynergy(SInt32 x) const
OSXScreen::mapScrollWheelFromBarrier(SInt32 x) const
{
// use server's acceleration with a little boost since other platforms
// take one wheel step as a larger step than the mac does.
@@ -1885,7 +1885,7 @@ OSXScreen::HotKeyItem::operator<(const HotKeyItem& x) const
}
// Quartz event tap support for the secondary display. This makes sure that we
// will show the cursor if a local event comes in while synergy has the cursor
// will show the cursor if a local event comes in while barrier has the cursor
// off the screen.
CGEventRef
OSXScreen::handleCGInputEventSecondary(
@@ -1947,9 +1947,9 @@ OSXScreen::handleCGInputEvent(CGEventTapProxy proxy,
return event;
break;
case kCGEventScrollWheel:
screen->onMouseWheel(screen->mapScrollWheelToSynergy(
screen->onMouseWheel(screen->mapScrollWheelToBarrier(
CGEventGetIntegerValueField(event, kCGScrollWheelEventDeltaAxis2)),
screen->mapScrollWheelToSynergy(
screen->mapScrollWheelToBarrier(
CGEventGetIntegerValueField(event, kCGScrollWheelEventDeltaAxis1)));
break;
case kCGEventKeyDown:

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -19,7 +19,7 @@
#import "platform/OSXScreenSaver.h"
#import "platform/OSXScreenSaverUtil.h"
#import "synergy/IPrimaryScreen.h"
#import "barrier/IPrimaryScreen.h"
#import "base/Log.h"
#import "base/IEventQueue.h"

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#pragma once
#include "synergy/IScreenSaver.h"
#include "barrier/IScreenSaver.h"
#include <Carbon/Carbon.h>

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2009 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2004 Chris Schoeneman, Nick Bolton, Sorin Sbarnea
*
* This package is free software; you can redistribute it and/or

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or
@@ -201,7 +201,7 @@ OSXUchrKeyResource::getDeadKey(
// convert keys to their dead counterparts
for (KeySequence::iterator i = keys.begin(); i != keys.end(); ++i) {
*i = synergy::KeyMap::getDeadKey(*i);
*i = barrier::KeyMap::getDeadKey(*i);
}
return true;

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2016 Symless Ltd.
*
* This package is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
#pragma once
#include "synergy/KeyState.h"
#include "barrier/KeyState.h"
#include "platform/IOSXKeyResource.h"
#include <Carbon/Carbon.h>

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,14 +18,14 @@
#pragma once
#include "synergy/clipboard_types.h"
#include "synergy/IClipboard.h"
#include "barrier/clipboard_types.h"
#include "barrier/IClipboard.h"
#include "common/stdmap.h"
#include "common/stdlist.h"
#include "common/stdvector.h"
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/Xlib.h>
#endif

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -62,7 +62,7 @@ XWindowsEventQueueBuffer::XWindowsEventQueueBuffer(
assert(m_display != NULL);
assert(m_window != None);
m_userEvent = XInternAtom(m_display, "SYNERGY_USER_EVENT", False);
m_userEvent = XInternAtom(m_display, "BARRIER_USER_EVENT", False);
// set up for pipe hack
int result = pipe(m_pipefd);
assert(result == 0);

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
*
@@ -23,7 +23,7 @@
#include "common/stdvector.h"
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/Xlib.h>
#endif

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
*
@@ -26,7 +26,7 @@
#include <cstddef>
#include <algorithm>
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/X.h>
# include <X11/Xutil.h>
@@ -52,7 +52,7 @@ XWindowsKeyState::XWindowsKeyState(
XWindowsKeyState::XWindowsKeyState(
Display* display, bool useXKB,
IEventQueue* events, synergy::KeyMap& keyMap) :
IEventQueue* events, barrier::KeyMap& keyMap) :
KeyState(events, keyMap),
m_display(display),
m_modifierFromX(ModifiersFromXDefaultSize)
@@ -218,10 +218,10 @@ XWindowsKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const
}
void
XWindowsKeyState::getKeyMap(synergy::KeyMap& keyMap)
XWindowsKeyState::getKeyMap(barrier::KeyMap& keyMap)
{
// get autorepeat info. we must use the global_auto_repeat told to
// us because it may have modified by synergy.
// us because it may have modified by barrier.
int oldGlobalAutoRepeat = m_keyboardState.global_auto_repeat;
XGetKeyboardControl(m_display, &m_keyboardState);
m_keyboardState.global_auto_repeat = oldGlobalAutoRepeat;
@@ -297,7 +297,7 @@ XWindowsKeyState::fakeKey(const Keystroke& keystroke)
}
void
XWindowsKeyState::updateKeysymMap(synergy::KeyMap& keyMap)
XWindowsKeyState::updateKeysymMap(barrier::KeyMap& keyMap)
{
// there are up to 4 keysyms per keycode
static const int maxKeysyms = 4;
@@ -391,7 +391,7 @@ XWindowsKeyState::updateKeysymMap(synergy::KeyMap& keyMap)
}
// add entries for each keycode
synergy::KeyMap::KeyItem item;
barrier::KeyMap::KeyItem item;
for (int i = 0; i < numKeycodes; ++i) {
KeySym* keysyms = allKeysyms + maxKeysyms * i;
KeyCode keycode = static_cast<KeyCode>(i + minKeycode);
@@ -495,7 +495,7 @@ XWindowsKeyState::updateKeysymMap(synergy::KeyMap& keyMap)
item.m_lock = false;
if (modifierButtons.count(keycode) > 0) {
// get flags for modifier keys
synergy::KeyMap::initModifierKey(item);
barrier::KeyMap::initModifierKey(item);
// add mapping from X (unless we already have)
if (item.m_generates != 0) {
@@ -543,7 +543,7 @@ XWindowsKeyState::updateKeysymMap(synergy::KeyMap& keyMap)
#if HAVE_XKB_EXTENSION
void
XWindowsKeyState::updateKeysymMapXKB(synergy::KeyMap& keyMap)
XWindowsKeyState::updateKeysymMapXKB(barrier::KeyMap& keyMap)
{
static const XkbKTMapEntryRec defMapEntry = {
True, // active
@@ -589,7 +589,7 @@ XWindowsKeyState::updateKeysymMapXKB(synergy::KeyMap& keyMap)
// check every button. on this pass we save all modifiers as native
// X modifier masks.
synergy::KeyMap::KeyItem item;
barrier::KeyMap::KeyItem item;
for (int i = m_xkb->min_key_code; i <= m_xkb->max_key_code; ++i) {
KeyCode keycode = static_cast<KeyCode>(i);
item.m_button = static_cast<KeyButton>(keycode);
@@ -773,7 +773,7 @@ XWindowsKeyState::updateKeysymMapXKB(synergy::KeyMap& keyMap)
}
}
// change all modifier masks to synergy masks from X masks
// change all modifier masks to barrier masks from X masks
keyMap.foreachKey(&XWindowsKeyState::remapKeyModifiers, this);
// allow composition across groups
@@ -783,7 +783,7 @@ XWindowsKeyState::updateKeysymMapXKB(synergy::KeyMap& keyMap)
void
XWindowsKeyState::remapKeyModifiers(KeyID id, SInt32 group,
synergy::KeyMap::KeyItem& item, void* vself)
barrier::KeyMap::KeyItem& item, void* vself)
{
XWindowsKeyState* self = static_cast<XWindowsKeyState*>(vself);
item.m_required =

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
*
@@ -18,18 +18,18 @@
#pragma once
#include "synergy/KeyState.h"
#include "barrier/KeyState.h"
#include "common/stdmap.h"
#include "common/stdvector.h"
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/Xlib.h>
# if HAVE_X11_EXTENSIONS_XTEST_H
# include <X11/extensions/XTest.h>
# else
# error The XTest extension is required to build synergy
# error The XTest extension is required to build barrier
# endif
# if HAVE_XKB_EXTENSION
# include <X11/extensions/XKBstr.h>
@@ -52,7 +52,7 @@ public:
XWindowsKeyState(Display*, bool useXKB, IEventQueue* events);
XWindowsKeyState(Display*, bool useXKB,
IEventQueue* events, synergy::KeyMap& keyMap);
IEventQueue* events, barrier::KeyMap& keyMap);
~XWindowsKeyState();
//! @name modifiers
@@ -78,24 +78,24 @@ public:
//! @name accessors
//@{
//! Convert X modifier mask to synergy mask
//! Convert X modifier mask to barrier mask
/*!
Returns the synergy modifier mask corresponding to the X modifier
Returns the barrier modifier mask corresponding to the X modifier
mask in \p state.
*/
KeyModifierMask mapModifiersFromX(unsigned int state) const;
//! Convert synergy modifier mask to X mask
//! Convert barrier modifier mask to X mask
/*!
Converts the synergy modifier mask to the corresponding X modifier
Converts the barrier modifier mask to the corresponding X modifier
mask. Returns \c true if successful and \c false if any modifier
could not be converted.
*/
bool mapModifiersToX(KeyModifierMask, unsigned int&) const;
//! Convert synergy key to all corresponding X keycodes
//! Convert barrier key to all corresponding X keycodes
/*!
Converts the synergy key \p key to all of the keycodes that map to
Converts the barrier key \p key to all of the keycodes that map to
that key.
*/
void mapKeyToKeycodes(KeyID key,
@@ -112,19 +112,19 @@ public:
protected:
// KeyState overrides
virtual void getKeyMap(synergy::KeyMap& keyMap);
virtual void getKeyMap(barrier::KeyMap& keyMap);
virtual void fakeKey(const Keystroke& keystroke);
private:
void init(Display* display, bool useXKB);
void updateKeysymMap(synergy::KeyMap&);
void updateKeysymMapXKB(synergy::KeyMap&);
void updateKeysymMap(barrier::KeyMap&);
void updateKeysymMapXKB(barrier::KeyMap&);
bool hasModifiersXKB() const;
int getEffectiveGroup(KeyCode, int group) const;
UInt32 getGroupFromState(unsigned int state) const;
static void remapKeyModifiers(KeyID, SInt32,
synergy::KeyMap::KeyItem&, void*);
barrier::KeyMap::KeyItem&, void*);
private:
struct XKBModifierInfo {
@@ -153,10 +153,10 @@ private:
XKBModifierMap m_lastGoodXKBModifiers;
NonXKBModifierMap m_lastGoodNonXKBModifiers;
// X modifier (bit number) to synergy modifier (mask) mapping
// X modifier (bit number) to barrier modifier (mask) mapping
KeyModifierMaskList m_modifierFromX;
// synergy modifier (mask) to X modifier (mask)
// barrier modifier (mask) to X modifier (mask)
KeyModifierToXMask m_modifierToX;
// map KeyID to all keycodes that can synthesize that KeyID

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -23,9 +23,9 @@
#include "platform/XWindowsKeyState.h"
#include "platform/XWindowsScreenSaver.h"
#include "platform/XWindowsUtil.h"
#include "synergy/Clipboard.h"
#include "synergy/KeyMap.h"
#include "synergy/XScreen.h"
#include "barrier/Clipboard.h"
#include "barrier/KeyMap.h"
#include "barrier/XScreen.h"
#include "arch/XArch.h"
#include "arch/Arch.h"
#include "base/Log.h"
@@ -38,7 +38,7 @@
#include <cstdlib>
#include <algorithm>
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/X.h>
# include <X11/Xutil.h>
@@ -53,7 +53,7 @@
# if HAVE_X11_EXTENSIONS_XTEST_H
# include <X11/extensions/XTest.h>
# else
# error The XTest extension is required to build synergy
# error The XTest extension is required to build barrier
# endif
# if HAVE_X11_EXTENSIONS_XINERAMA_H
// Xinerama.h may lack extern "C" for inclusion by C++
@@ -739,11 +739,11 @@ XWindowsScreen::registerHotKey(KeyID key, KeyModifierMask mask)
m_oldHotKeyIDs.push_back(id);
m_hotKeys.erase(id);
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask));
LOG((CLOG_WARN "failed to register hotkey %s (id=%04x mask=%04x)", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask));
return 0;
}
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", synergy::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
LOG((CLOG_DEBUG "registered hotkey %s (id=%04x mask=%04x) as id=%d", barrier::KeyMap::formatKey(key, mask).c_str(), key, mask, id));
return id;
}
@@ -987,7 +987,7 @@ XWindowsScreen::saveShape()
// 0,0 to Wm,Hm where Wm (Hm) is the minimum width (height) over
// all physical screens. this warp only seems to happen if the
// pointer wasn't in that region before the XWarpPointer(). the
// second (unexpected) warp causes synergy to think the pointer
// second (unexpected) warp causes barrier to think the pointer
// has been moved when it hasn't. to work around the problem,
// we warp the pointer to the center of the first physical
// screen instead of the logical screen.
@@ -1073,7 +1073,7 @@ XWindowsScreen::openIM()
return;
}
// find the appropriate style. synergy supports XIMPreeditNothing
// find the appropriate style. barrier supports XIMPreeditNothing
// only at the moment.
XIMStyles* styles;
if (XGetIMValues(im, XNQueryInputStyle, &styles, NULL) != NULL ||

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,13 +18,13 @@
#pragma once
#include "synergy/PlatformScreen.h"
#include "synergy/KeyMap.h"
#include "barrier/PlatformScreen.h"
#include "barrier/KeyMap.h"
#include "common/stdset.h"
#include "common/stdvector.h"
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/Xlib.h>
#endif
@@ -244,7 +244,7 @@ private:
int m_xrandrEventBase;
IEventQueue* m_events;
synergy::KeyMap m_keyMap;
barrier::KeyMap m_keyMap;
// pointer to (singleton) screen. this is only needed by
// ioErrorHandler().

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -19,7 +19,7 @@
#include "platform/XWindowsScreenSaver.h"
#include "platform/XWindowsUtil.h"
#include "synergy/IPlatformScreen.h"
#include "barrier/IPlatformScreen.h"
#include "base/Log.h"
#include "base/Event.h"
#include "base/IEventQueue.h"
@@ -29,7 +29,7 @@
#if HAVE_X11_EXTENSIONS_XTEST_H
# include <X11/extensions/XTest.h>
#else
# error The XTest extension is required to build synergy
# error The XTest extension is required to build barrier
#endif
#if HAVE_X11_EXTENSIONS_DPMS_H
extern "C" {

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,12 +18,12 @@
#pragma once
#include "synergy/IScreenSaver.h"
#include "barrier/IScreenSaver.h"
#include "base/IEventQueue.h"
#include "common/stdmap.h"
#if X_DISPLAY_MISSING
# error X11 is required to build synergy
# error X11 is required to build barrier
#else
# include <X11/Xlib.h>
#endif

View File

@@ -1,5 +1,5 @@
/*
* synergy -- mouse and keyboard sharing utility
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
*
@@ -18,7 +18,7 @@
#include "platform/XWindowsUtil.h"
#include "synergy/key_types.h"
#include "barrier/key_types.h"
#include "mt/Thread.h"
#include "base/Log.h"
#include "base/String.h"
@@ -1619,10 +1619,10 @@ XWindowsUtil::atomToString(Display* display, Atom atom)
XWindowsUtil::ErrorLock lock(display, &error);
char* name = XGetAtomName(display, atom);
if (error) {
return synergy::string::sprintf("<UNKNOWN> (%d)", (int)atom);
return barrier::string::sprintf("<UNKNOWN> (%d)", (int)atom);
}
else {
String msg = synergy::string::sprintf("%s (%d)", name, (int)atom);
String msg = barrier::string::sprintf("%s (%d)", name, (int)atom);
XFree(name);
return msg;
}
@@ -1638,12 +1638,12 @@ XWindowsUtil::atomsToString(Display* display, const Atom* atom, UInt32 num)
String msg;
if (error) {
for (UInt32 i = 0; i < num; ++i) {
msg += synergy::string::sprintf("<UNKNOWN> (%d), ", (int)atom[i]);
msg += barrier::string::sprintf("<UNKNOWN> (%d), ", (int)atom[i]);
}
}
else {
for (UInt32 i = 0; i < num; ++i) {
msg += synergy::string::sprintf("%s (%d), ", names[i], (int)atom[i]);
msg += barrier::string::sprintf("%s (%d), ", names[i], (int)atom[i]);
XFree(names[i]);
}
}

Some files were not shown because too many files have changed in this diff Show More