SYNERGY-1050 Synergy1. Floating issue. User is not able to paste to c… (#7057)
* SYNERGY-1050 Synergy1. Floating issue. User is not able to paste to client in some cases *Fix copy paste logic, when OS reported about clipboard update too late * SYNERGY-1050 Synergy1. Floating issue. User is not able to paste to client in some cases Update changelog Co-authored-by: Andrii Batyiev <andrii-external@symless.com> Co-authored-by: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com>
This commit is contained in:
parent
c87bedf938
commit
7a064777d8
3 changed files with 21 additions and 5 deletions
|
|
@ -11,6 +11,7 @@ Bug fixes:
|
|||
- #7036 Fix tray icon not changing theme on Big Sur
|
||||
- #7046 Fix MacOS 10.13 build
|
||||
- #7049 Scroll doesn't work in case of macOS is server
|
||||
- #7057 Fix copy paste logic, when OS reported about clipboard update too late
|
||||
- #7055 Add secure input notification on Linux
|
||||
- #7052 Add secure input notification on Windows
|
||||
- #7047 Fix prevent sleep option on Mac and Windows
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ MSWindowsClipboard::empty()
|
|||
void
|
||||
MSWindowsClipboard::add(EFormat format, const String& data)
|
||||
{
|
||||
LOG((CLOG_DEBUG "add %d bytes to clipboard format: %d", data.size(), format));
|
||||
|
||||
bool isSucceeded = false;
|
||||
// convert data to win32 form
|
||||
for (ConverterList::const_iterator index = m_converters.begin();
|
||||
index != m_converters.end(); ++index) {
|
||||
|
|
@ -111,11 +110,20 @@ MSWindowsClipboard::add(EFormat format, const String& data)
|
|||
if (converter->getFormat() == format) {
|
||||
HANDLE win32Data = converter->fromIClipboard(data);
|
||||
if (win32Data != NULL) {
|
||||
UINT win32Format = converter->getWin32Format();
|
||||
m_facade->write(win32Data, win32Format);
|
||||
LOG((CLOG_DEBUG "add %d bytes to clipboard format: %d", data.size(), format));
|
||||
m_facade->write(win32Data, converter->getWin32Format());
|
||||
isSucceeded = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
LOG((CLOG_DEBUG "failed to convert clipboard data to platform format"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!isSucceeded){
|
||||
LOG((CLOG_DEBUG "missed clipboard data convert for format: %d", format));
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -1302,6 +1302,13 @@ Server::handleClipboardGrabbed(const Event& event, void* vclient)
|
|||
client->grabClipboard(info->m_id);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_active != m_primaryClient) {
|
||||
LOG((CLOG_INFO "clipboard grabbed, but we are already changed active screen. Resend clipboard data"));
|
||||
for (ClipboardID id = 0; id < kClipboardEnd; ++id) {
|
||||
onClipboardChanged(m_primaryClient, id, m_clipboards[id].m_clipboardSeqNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1570,7 +1577,6 @@ Server::onClipboardChanged(BaseClientProxy* sender,
|
|||
// get data
|
||||
sender->getClipboard(id, &clipboard.m_clipboard);
|
||||
|
||||
// ignore if data hasn't changed
|
||||
String data = clipboard.m_clipboard.marshall();
|
||||
if (data.size() > m_maximumClipboardSize * 1024) {
|
||||
LOG((CLOG_NOTE "not updating clipboard because it's over the size limit (%i KB) configured by the server",
|
||||
|
|
@ -1578,6 +1584,7 @@ Server::onClipboardChanged(BaseClientProxy* sender,
|
|||
return;
|
||||
}
|
||||
|
||||
// ignore if data hasn't changed
|
||||
if (data == clipboard.m_clipboardData) {
|
||||
LOG((CLOG_DEBUG "ignored screen \"%s\" update of clipboard %d (unchanged)", clipboard.m_clipboardOwner.c_str(), id));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue