Ensure the clipboard contents are stored properly on GTK
GTK needs to be told the data on the clipboard can be stored before the store is attempted. Also, document that the clipboard behavior on GTK is very dependent on the configuration of the user's machine. Closes #10515
This commit is contained in:
@@ -151,7 +151,8 @@ void MyFrame::OnFlush(wxCommandEvent &WXUNUSED(event))
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !wxTheClipboard->AddData(new wxTextDataObject("Text from wx clipboard sample")) )
|
||||
wxString clipData = wxString::Format("Text from wx clipboard sample at %s" , wxDateTime::Now().Format());
|
||||
if ( !wxTheClipboard->AddData(new wxTextDataObject(clipData)) )
|
||||
{
|
||||
m_textctrl->AppendText("Failed to put text on clipboard.\n");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user