From cee6127eb812767eea70583451fb9e461334851f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Thu, 10 Jun 1999 17:13:28 +0000 Subject: [PATCH 1/1] Attempt to add primary selection support, but doesn't work. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/clipbrd.cpp | 7 ++++--- src/gtk1/clipbrd.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index a4bf7b6a6f..966eb2d3ca 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -422,7 +422,8 @@ bool wxClipboard::Open() wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") ); m_open = TRUE; - + UsePrimarySelection(FALSE); + return TRUE; } @@ -547,7 +548,7 @@ bool wxClipboard::IsSupported( wxDataFormat format ) m_waiting = TRUE; gtk_selection_convert( m_targetsWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, g_targetsAtom, GDK_CURRENT_TIME ); @@ -592,7 +593,7 @@ bool wxClipboard::GetData( wxDataObject *data ) m_waiting = TRUE; gtk_selection_convert( m_clipboardWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, m_targetRequested, GDK_CURRENT_TIME ); diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index a4bf7b6a6f..966eb2d3ca 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -422,7 +422,8 @@ bool wxClipboard::Open() wxCHECK_MSG( !m_open, FALSE, _T("clipboard already open") ); m_open = TRUE; - + UsePrimarySelection(FALSE); + return TRUE; } @@ -547,7 +548,7 @@ bool wxClipboard::IsSupported( wxDataFormat format ) m_waiting = TRUE; gtk_selection_convert( m_targetsWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, g_targetsAtom, GDK_CURRENT_TIME ); @@ -592,7 +593,7 @@ bool wxClipboard::GetData( wxDataObject *data ) m_waiting = TRUE; gtk_selection_convert( m_clipboardWidget, - g_clipboardAtom, + m_usePrimary?GDK_SELECTION_PRIMARY:g_clipboardAtom, m_targetRequested, GDK_CURRENT_TIME ); -- 2.45.2