[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara caolanm at redhat.com
Thu Aug 27 03:09:02 PDT 2015


 vcl/unx/gtk3/app/gtk3gtkinst.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 26786ae2e98cbe041766872e9aacce6d07e6a5c4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 27 11:06:57 2015 +0100

    gtk3: paste special empty
    
    the paste special listener listens to owner changed, but expects
    the owner changed event to contain the new contents, while the
    original code expected getContents to be explicitly called to get
    the new contents. So on owner changed always return the up to
    date contents
    
    Change-Id: Iaa7df2c01d360c3c5831b2258b4c2d41740fdffc

diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
index d8c278f..823d741 100644
--- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
@@ -529,7 +529,6 @@ void VclGtkClipboard::setContents(
 
     std::list< Reference< datatransfer::clipboard::XClipboardListener > > xListeners( m_aListeners );
     datatransfer::clipboard::ClipboardEvent aEv;
-    aEv.Contents = m_aContents;
 
     if (m_aContents.is())
     {
@@ -579,6 +578,8 @@ void VclGtkClipboard::setContents(
         m_aGtkTargets = aGtkTargets;
     }
 
+    aEv.Contents = getContents();
+
     aGuard.clear();
 
     if( xOldOwner.is() && xOldOwner != xClipboardOwner )


More information about the Libreoffice-commits mailing list