X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/451c5cc7b9e72f6231085056e91bcd53612e54bb..377a219ac700cdf055216541a150a0f25912f373:/src/stc/ScintillaWX.cpp diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index ec2297af18..50bfac2f18 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -110,7 +110,7 @@ public: CaptureMouse(); } else { - ReleaseMouse(); + if (HasCapture()) ReleaseMouse(); } return retval; } @@ -320,6 +320,7 @@ void ScintillaWX::Copy() { SelectionText st; CopySelectionRange(&st); wxTheClipboard->Open(); + wxTheClipboard->UsePrimarySelection(); wxString text = stc2wx(st.s, st.len); wxTheClipboard->SetData(new wxTextDataObject(text)); wxTheClipboard->Close(); @@ -335,6 +336,7 @@ void ScintillaWX::Paste() { bool gotData; wxTheClipboard->Open(); + wxTheClipboard->UsePrimarySelection(); gotData = wxTheClipboard->GetData(data); wxTheClipboard->Close(); if (gotData) { @@ -354,6 +356,7 @@ bool ScintillaWX::CanPaste() { bool canPaste; wxTheClipboard->Open(); + wxTheClipboard->UsePrimarySelection(); canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT); wxTheClipboard->Close(); @@ -575,7 +578,8 @@ void ScintillaWX::DoCommand(int ID) { void ScintillaWX::DoContextMenu(Point pt) { - ContextMenu(pt); + if (displayPopupMenu) + ContextMenu(pt); } void ScintillaWX::DoOnListBox() {