summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-09 09:45:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-09 09:46:21 +0100
commitf3f1919aa4eca2f6180649eda43bcb813b1f0450 (patch)
tree61d62a7a26f8adf6e878c2a81b7c1b336844e564
parent3870d1145696a5d3969c269b5a8b19a6360d6b63 (diff)
Resolves: tdf#93887 distinguish between empty selection lost selection
Change-Id: Id0be728602b3c58b2853ff464336d68303531efe
-rw-r--r--vcl/unx/gtk3/app/gtk3gtkinst.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
index 9d7284f3a54c..1656b0f678a2 100644
--- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
@@ -372,8 +372,11 @@ sal_Bool VclGtkClipboard::supportsService( const OUString& ServiceName ) throw(
Reference< css::datatransfer::XTransferable > VclGtkClipboard::getContents() throw( RuntimeException, std::exception )
{
- if (!m_aContents.is())
+ if (G_OBJECT(m_pOwner) != gtk_clipboard_get_owner(gtk_clipboard_get(m_nSelection)) &&
+ !m_aContents.is())
{
+ //tdf#93887 This is the system clipboard/selection. We fetch it when we are not
+ //the owner of the clipboard and have not already fetched it.
m_aContents = new GtkTransferable(m_nSelection);
}
return m_aContents;