X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c5b83b0fa94deaa77ff72760bb9ba0e51a03202..12447831a8ebc506f730cafac6f6ef13f243b7d2:/src/stc/ScintillaWX.cpp?ds=sidebyside diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index a633e35e70..5e3d95b65a 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(); @@ -527,7 +530,7 @@ void ScintillaWX::DoAddChar(int key) { } int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) { -#ifdef __WXGTK__ +#if defined(__WXGTK__) || defined(__WXMAC__) // Ctrl chars (A-Z) end up with the wrong keycode on wxGTK... if (ctrl && key >= 1 && key <= 26) key += 'A' - 1;