mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 21:03:54 +08:00
initial revision of synergy. currently semi-supports X windows
on unix, but client screens don't simulate events other than mouse move. also not supporting clipboard at all yet and the main app is just a temporary framework to test with. must clean up protocol and communication.
This commit is contained in:
34
CUnixXScreen.cpp
Normal file
34
CUnixXScreen.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "CUnixXScreen.h"
|
||||
#include "CUnixEventQueue.h"
|
||||
#include "TMethodJob.h"
|
||||
#include <X11/X.h>
|
||||
|
||||
//
|
||||
// CUnixXScreen
|
||||
//
|
||||
|
||||
CUnixXScreen::CUnixXScreen(const CString& name) :
|
||||
CXScreen(name)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
CUnixXScreen::~CUnixXScreen()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
void CUnixXScreen::onOpen(bool)
|
||||
{
|
||||
// register our X event handler
|
||||
CEQ->addFileDesc(ConnectionNumber(getDisplay()),
|
||||
new TMethodJob<CUnixXScreen>(this,
|
||||
&CUnixXScreen::onEvents), NULL);
|
||||
|
||||
}
|
||||
|
||||
void CUnixXScreen::onClose()
|
||||
{
|
||||
// unregister the X event handler
|
||||
CEQ->removeFileDesc(ConnectionNumber(getDisplay()));
|
||||
}
|
||||
Reference in New Issue
Block a user