Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions 3rdparty/barrier/src/lib/server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,25 @@ Server::handleClipboardGrabbed(const Event& event, void* vclient)
client->grabClipboard(info->m_id);
}
}

// if the primary screen grabbed the clipboard (i.e. the user copied
// on the server side), read the actual clipboard data now and push
// it to all other clients. without this the data would only be
// transferred when the mouse crosses the screen boundary (via
// switchScreen), leaving remote clients without clipboard content
// when the user never moves the mouse off the primary screen.
if (grabber == m_primaryClient) {
if (grabber->getClipboard(info->m_id, &clipboard.m_clipboard)) {
clipboard.m_clipboardData = clipboard.m_clipboard.marshall();
for (ClientList::iterator index = m_clients.begin();
index != m_clients.end(); ++index) {
BaseClientProxy* client = index->second;
if (client != grabber) {
client->setClipboard(info->m_id, &clipboard.m_clipboard);
}
}
}
}
}

void
Expand Down
Loading