From: Karsten Ballüder Date: Thu, 10 Jun 1999 17:13:28 +0000 (+0000) Subject: Attempt to add primary selection support, but doesn't work. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cee6127eb812767eea70583451fb9e461334851f?hp=2b62ab357594df74e90793f66c0dfc17fb0e9125 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 --- 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 );