X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/164e8d41ae8f7ca86fe4a39cef8fae8dd103bb29..fba41cf33a3952077133d387f2cc49d211f3d893:/src/msw/clipbrd.cpp diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 4a1518b0ff..2369d769fb 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -547,6 +547,9 @@ wxClipboard::~wxClipboard() void wxClipboard::Clear() { + if ( IsUsingPrimarySelection() ) + return; + #if wxUSE_OLE_CLIPBOARD if (m_lastDataObject) { @@ -613,6 +616,9 @@ bool wxClipboard::IsOpened() const bool wxClipboard::SetData( wxDataObject *data ) { + if ( IsUsingPrimarySelection() ) + return false; + #if !wxUSE_OLE_CLIPBOARD (void)wxEmptyClipboard(); #endif // wxUSE_OLE_CLIPBOARD @@ -625,6 +631,9 @@ bool wxClipboard::SetData( wxDataObject *data ) bool wxClipboard::AddData( wxDataObject *data ) { + if ( IsUsingPrimarySelection() ) + return false; + wxCHECK_MSG( data, false, wxT("data is invalid") ); #if wxUSE_OLE_CLIPBOARD @@ -718,11 +727,14 @@ void wxClipboard::Close() bool wxClipboard::IsSupported( const wxDataFormat& format ) { - return wxIsClipboardFormatAvailable(format); + return !IsUsingPrimarySelection() && wxIsClipboardFormatAvailable(format); } bool wxClipboard::GetData( wxDataObject& data ) { + if ( IsUsingPrimarySelection() ) + return false; + #if wxUSE_OLE_CLIPBOARD IDataObject *pDataObject = NULL; HRESULT hr = OleGetClipboard(&pDataObject);