mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-21 10:27:36 +02:00
Send clipboard data in a thread #4601
This commit is contained in:
parent
44089d55e8
commit
4c36c08099
4 changed files with 19 additions and 66 deletions
|
@ -91,7 +91,8 @@ Server::Server(
|
|||
m_ignoreFileTransfer(false),
|
||||
m_enableDragDrop(enableDragDrop),
|
||||
m_getDragInfoThread(NULL),
|
||||
m_waitDragInfoThread(true)
|
||||
m_waitDragInfoThread(true),
|
||||
m_dataTransmissionThread(NULL)
|
||||
{
|
||||
// must have a primary client and it must have a canonical name
|
||||
assert(m_primaryClient != NULL);
|
||||
|
@ -505,9 +506,10 @@ Server::switchScreen(BaseClientProxy* dst,
|
|||
forScreensaver);
|
||||
|
||||
// send the clipboard data to new active screen
|
||||
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
||||
m_active->setClipboard(id, &m_clipboards[id].m_clipboard);
|
||||
}
|
||||
m_dataTransmissionThread = new Thread(
|
||||
new TMethodJob<Server>(
|
||||
this, &Server::clipboardTransmissionThread,
|
||||
NULL));
|
||||
|
||||
Server::SwitchToScreenInfo* info =
|
||||
Server::SwitchToScreenInfo::alloc(m_active->getName());
|
||||
|
@ -1849,6 +1851,14 @@ Server::sendDragInfo(BaseClientProxy* newScreen)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Server::clipboardTransmissionThread(void*)
|
||||
{
|
||||
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
||||
m_active->setClipboard(id, &m_clipboards[id].m_clipboard);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Server::onMouseMoveSecondary(SInt32 dx, SInt32 dy)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue