Ticket #33885: synergy-bug2962-clipboard.diff

File synergy-bug2962-clipboard.diff, 1.6 KB (added by andrewberry@…, 12 years ago)
  • files/patch-bug2962-clipboard.diff

     
     1Index: src/lib/platform/COSXClipboard.cpp
     2===================================================================
     3--- src/lib/platform/COSXClipboard.cpp  (revision 1169)
     4+++ src/lib/platform/COSXClipboard.cpp  (revision 1170)
     5@@ -87,6 +87,7 @@
     6        void
     7 COSXClipboard::add(EFormat format, const CString & data)
     8 {
     9+       bool emptied = false;
     10        if (m_pboard == NULL)
     11                return;
     12 
     13@@ -105,9 +106,14 @@
     14 
     15                        // integ tests showed that if you call add(...) twice, then the
     16                        // second call will actually fail to set clipboard data. calling
     17-                       // empty() seems to solve this problem.
     18-                       empty();
     19-
     20+                       // empty() seems to solve this problem. but, only clear the clipboard
     21+                       // for the first converter, otherwise further converters will wipe out
     22+                       // what we just added.
     23+                       if (!emptied) {
     24+                               empty();
     25+                               emptied = true;
     26+                       }
     27+                       
     28                        PasteboardPutItemFlavor(
     29                                        m_pboard,
     30                                        (PasteboardItemID) 0,
  • Portfile

     
    3030
    3131# See http://synergy-foss.org/pm/issues/57
    3232patchfiles-append patch-bug57-keypress.diff \
    33                   patch-bug57-modifiers.diff
     33                  patch-bug57-modifiers.diff \
     34                  patch-bug2962-clipboard.diff
    3435
    3536post-patch {
    3637    # Set default config path