vcpkg/ports/wxwidgets/fix-macos-clipboard.patch

27 lines
622 B
Diff
Raw Normal View History

diff --git a/src/osx/carbon/clipbrd.cpp b/src/osx/carbon/clipbrd.cpp
index 274e200..6012d37 100644
--- a/src/osx/carbon/clipbrd.cpp
+++ b/src/osx/carbon/clipbrd.cpp
@@ -60,7 +60,11 @@ void wxClipboard::Clear()
bool wxClipboard::Flush()
{
- return false;
+ wxCHECK_MSG( m_open, false, wxT("clipboard not open") );
+
+ wxOSXPasteboard::GetGeneralClipboard()->Flush();
+
+ return true;
}
bool wxClipboard::Open()
@@ -105,6 +109,8 @@ bool wxClipboard::AddData( wxDataObject *data )
data->WriteToSink(wxOSXPasteboard::GetGeneralClipboard());
+ Flush();
+
m_data = data;
return true;