mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-22 10:31:45 +03:00
900b075e3a
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.
35 lines
601 B
C++
35 lines
601 B
C++
#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()));
|
|
}
|