ecere/gui/EditBox: Stopping OnLeftButtonDown/Up going through even if clickThrough...
authorJerome St-Louis <jerome@ecere.com>
Fri, 28 Feb 2014 11:02:36 +0000 (06:02 -0500)
committerJerome St-Louis <jerome@ecere.com>
Fri, 28 Feb 2014 11:02:36 +0000 (06:02 -0500)
- DataBoxes automatically set EditBox editors to true
- This was causing DataBoxes to Refresh() themselves in WSMS when clicking to reposition the cursor
- A possible improvement might be to add a Modifiers flag marking an event as clickThrough so it could be ignored, so that EditBox clickThrough clicks could still be processed

ecere/src/gui/controls/EditBox.ec

index 56c29c5..35c32ab 100644 (file)
@@ -3251,7 +3251,9 @@ private:
 
       UpdateDirty();
       UpdateCaretPosition(true);
-      return true;
+      // Return false because DataBoxes automatically set EditBox editor's clickThrough to true for MouseMove events
+      // ( for tool tips -- see 95ee4962c4c7bc3fe0a04aa6a4f98cacada40884)
+      return false;
    }
 
    bool OnLeftButtonUp(int x, int y, Modifiers mods)
@@ -3358,7 +3360,9 @@ private:
          }
       }
       mouseMove = false;
-      return true;
+      // Return false because DataBoxes automatically set EditBox editor's clickThrough to true for MouseMove events
+      // ( for tool tips -- see 95ee4962c4c7bc3fe0a04aa6a4f98cacada40884)
+      return false;
    }
 
    bool OnMouseMove(int mx, int my, Modifiers mods)