mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-21 02:17:37 +02:00
Added a way to interrupt sending clipboard/file #4601
This commit is contained in:
parent
ff9ad5554a
commit
fb3252efef
4 changed files with 69 additions and 4 deletions
|
@ -505,7 +505,12 @@ Server::switchScreen(BaseClientProxy* dst,
|
|||
m_active->enter(x, y, m_seqNum,
|
||||
m_primaryClient->getToggleMask(),
|
||||
forScreensaver);
|
||||
|
||||
// if already sending clipboard, we need to interupt it, otherwise
|
||||
// clipboard data could be corrupted on the other side
|
||||
if (m_sendClipboardThread != NULL) {
|
||||
StreamChunker::interruptClipboard();
|
||||
}
|
||||
|
||||
// send the clipboard data to new active screen
|
||||
m_sendClipboardThread = new Thread(
|
||||
new TMethodJob<Server>(
|
||||
|
@ -2347,6 +2352,10 @@ Server::isReceivedFileSizeValid()
|
|||
void
|
||||
Server::sendFileToClient(const char* filename)
|
||||
{
|
||||
if (m_sendFileThread != NULL) {
|
||||
StreamChunker::interruptFile();
|
||||
}
|
||||
|
||||
m_sendFileThread = new Thread(
|
||||
new TMethodJob<Server>(
|
||||
this, &Server::sendFileThread,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue