]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/ScintillaWX.cpp
STC and Motif patch
[wxWidgets.git] / contrib / src / stc / ScintillaWX.cpp
index ec2297af18a9f9cc95ac7703d3787a8b04b579b4..5e3d95b65a799ce0b8155fb27bbc3d0d9ff39a7c 100644 (file)
@@ -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();