mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-05 23:07:59 +08:00
Some work toward Issue 27 and Issue 319
This commit is contained in:
@@ -293,7 +293,7 @@ CServer::adoptClient(CBaseClientProxy* client)
|
||||
|
||||
// send notification
|
||||
CServer::CScreenConnectedInfo* info =
|
||||
CServer::CScreenConnectedInfo::alloc(getName(client));
|
||||
new CServer::CScreenConnectedInfo(getName(client));
|
||||
EVENTQUEUE->addEvent(CEvent(CServer::getConnectedEvent(),
|
||||
m_primaryClient->getEventTarget(), info));
|
||||
}
|
||||
@@ -1638,7 +1638,7 @@ CServer::onMouseUp(ButtonID id)
|
||||
bool
|
||||
CServer::onMouseMovePrimary(SInt32 x, SInt32 y)
|
||||
{
|
||||
LOG((CLOG_DEBUG2 "onMouseMovePrimary %d,%d", x, y));
|
||||
LOG((CLOG_DEBUG4 "onMouseMovePrimary %d,%d", x, y));
|
||||
|
||||
// mouse move on primary (server's) screen
|
||||
if (m_active != m_primaryClient) {
|
||||
@@ -2133,22 +2133,6 @@ CServer::CSwitchInDirectionInfo::alloc(EDirection direction)
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CServer::CScreenConnectedInfo
|
||||
//
|
||||
|
||||
CServer::CScreenConnectedInfo*
|
||||
CServer::CScreenConnectedInfo::alloc(const CString& screen)
|
||||
{
|
||||
CScreenConnectedInfo* info =
|
||||
(CScreenConnectedInfo*)malloc(sizeof(CScreenConnectedInfo) +
|
||||
screen.size());
|
||||
strcpy(info->m_screen, screen.c_str());
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CServer::CKeyboardBroadcastInfo
|
||||
//
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "stdmap.h"
|
||||
#include "stdset.h"
|
||||
#include "stdvector.h"
|
||||
#include "INode.h"
|
||||
|
||||
class CBaseClientProxy;
|
||||
class CEventQueueTimer;
|
||||
@@ -35,7 +36,7 @@ class CInputFilter;
|
||||
/*!
|
||||
This class implements the top-level server algorithms for synergy.
|
||||
*/
|
||||
class CServer {
|
||||
class CServer : public INode {
|
||||
public:
|
||||
//! Lock cursor to screen data
|
||||
class CLockCursorToScreenInfo {
|
||||
@@ -70,11 +71,10 @@ public:
|
||||
//! Screen connected data
|
||||
class CScreenConnectedInfo {
|
||||
public:
|
||||
static CScreenConnectedInfo* alloc(const CString& screen);
|
||||
CScreenConnectedInfo(CString screen) : m_screen(screen) { }
|
||||
|
||||
public:
|
||||
// this is a C-string; this type is a variable size structure
|
||||
char m_screen[1];
|
||||
CString m_screen; // was char[1]
|
||||
};
|
||||
|
||||
//! Keyboard broadcast data
|
||||
|
||||
Reference in New Issue
Block a user