]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for drop source and for capturing the mouse
authorRobin Dunn <robin@alldunn.com>
Fri, 17 Mar 2000 19:30:19 +0000 (19:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 17 Mar 2000 19:30:19 +0000 (19:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/ScintillaWX.cpp
src/stc/ScintillaWX.cpp

index 7e44f56b3eed89c6e8fbbf35fdf57a33ba6a4250..cd0064be5c4003ef62e2d8cfbc20ffc614af190e 100644 (file)
@@ -96,7 +96,7 @@ void ScintillaWX::Finalise() {
 
 
 void ScintillaWX::StartDrag() {
-    wxDropSource        source;
+    wxDropSource        source(wMain.GetID());
     wxTextDataObject    data(dragChars);
     wxDragResult        result;
 
@@ -129,9 +129,9 @@ void ScintillaWX::SetTicking(bool on) {
 
 
 void ScintillaWX::SetMouseCapture(bool on) {
-    if (on)
+    if (on && !capturedMouse)
         wMain.GetID()->CaptureMouse();
-    else
+    else if (!on && capturedMouse)
         wMain.GetID()->ReleaseMouse();
     capturedMouse = on;
 }
index 7e44f56b3eed89c6e8fbbf35fdf57a33ba6a4250..cd0064be5c4003ef62e2d8cfbc20ffc614af190e 100644 (file)
@@ -96,7 +96,7 @@ void ScintillaWX::Finalise() {
 
 
 void ScintillaWX::StartDrag() {
-    wxDropSource        source;
+    wxDropSource        source(wMain.GetID());
     wxTextDataObject    data(dragChars);
     wxDragResult        result;
 
@@ -129,9 +129,9 @@ void ScintillaWX::SetTicking(bool on) {
 
 
 void ScintillaWX::SetMouseCapture(bool on) {
-    if (on)
+    if (on && !capturedMouse)
         wMain.GetID()->CaptureMouse();
-    else
+    else if (!on && capturedMouse)
         wMain.GetID()->ReleaseMouse();
     capturedMouse = on;
 }