remove unnecessary Clear() and wrong delete

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:44:28 +00:00
parent 5a6c061f37
commit 7b3774444b

View File

@@ -498,9 +498,6 @@ bool wxClipboard::AddData( wxDataObject *data )
wxCHECK_MSG( data, false, wxT("data is invalid") );
/* we can only store one wxDataObject */
Clear();
// in x11, the "copied data" hold by the program itself.
// so here just use m_data to hold the "copied data"
// use wxApp->ProcessXEvent to check whether there has
@@ -525,8 +522,6 @@ bool wxClipboard::AddData( wxDataObject *data )
XChangeProperty(xdisplay, window, XA_CLIPBOARD, XA_STRING, 8, PropModeReplace,
buf.data(), size);
delete buf;
XSetSelectionOwner(xdisplay, XA_CLIPBOARD, window, CurrentTime);
XFlush(xdisplay);
return true;