1. 11 Oct, 2019 1 commit
  2. 10 Oct, 2019 3 commits
  3. 07 Oct, 2019 1 commit
  4. 03 Oct, 2019 1 commit
  5. 02 Oct, 2019 1 commit
  6. 30 Sep, 2019 1 commit
  7. 26 Sep, 2019 2 commits
    • Kristin Ho's avatar
      Prevent PointerEnter[or Exit]Event from erasing event.down value (#40637) (#41332) · 034358e3
      Kristin Ho authored
      * MouseRegion documentation claimed that onEnter and onExit
        would track entry and exit regardless of whether the pointer was
        down or up
      * It did such, but when grabbing the value of `event.down` from
        the passed event, the value was always `false`
      * PointerEnterEvent and PointerExitEvent were overriding the value
        passed from PointerEvent in constructors, even if the value was true
        e.g. in invocations of .fromMouseEvent((PointerMoveEvent...))
      * This change now passes the value along to PointerEnter/ExitEvents
        while providing it a default of false, and updates documentation
      
      Fixes #40637
      034358e3
    • Greg Spencer's avatar
      Fix mouse hover to not schedule a frame for every mouse move. (#41014) · 05097916
      Greg Spencer authored
      This fixes the mouse hover code to not schedule frames with every mouse move.
      
      Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.
      
      The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
      05097916
  8. 24 Sep, 2019 2 commits
  9. 27 Aug, 2019 1 commit
  10. 06 Jun, 2019 2 commits
  11. 04 Jun, 2019 1 commit
  12. 03 Jun, 2019 1 commit
  13. 31 May, 2019 1 commit
  14. 30 May, 2019 1 commit
    • Greg Spencer's avatar
      Fix onExit calling when the mouse is removed. (#33477) · 07aede4c
      Greg Spencer authored
      This PR solves two problems: currently, the onExit is called for a mouse pointer the moment the removal message is received, except that by the time it actually calls it, there is no _lastEvent for it in the mouse tracker (it's already been removed), resulting in an event being passed to the onExit that contains nulls for the position. Also, removePointer events don't actually get created with a position, although they easily could be, so that even the the _lastEvent in the mouse tracker were still populated, it would still give a null position and delta.
      
      This PR adds support for the position and delta in a PointerRemovedEvent, and populates them. In addition, when a remove event is received, it doesn't actually remove the pointer until the mouse position check that gets scheduled actually happens.
      07aede4c
  15. 25 May, 2019 2 commits
  16. 20 May, 2019 1 commit
  17. 14 May, 2019 3 commits
  18. 09 May, 2019 2 commits
    • Michael Goderbauer's avatar
    • Greg Spencer's avatar
      Fix nested listeners so that ancestor listeners can also receive enter/exit/move events. (#32350) · aeccd6a8
      Greg Spencer authored
      This changes Listener to trigger enter/move/exit in all Listeners below the pointer, not just the leaf region (the first region hit). This is because we need to allow listeners to be nested so that, say, a widget that handles changing color on hover, but also is wrapped in a Tooltip (that handles hover) can trigger both actions, not just one.
      
      To that end, I added a findAll to Layer, similar to the existing find method that was previously used. It returns an iterator over annotated layers which match the given data type.
      
      Since the findAll is implemented as returning an Iterable (and is sync*), I re-implemented the find routines as just returning the first result from findAll, since that should be just as efficient, and would then prevent duplication in the implementation.
      aeccd6a8
  19. 03 May, 2019 1 commit
  20. 01 May, 2019 1 commit
  21. 30 Apr, 2019 1 commit
    • Tong Mu's avatar
      Redo: Add buttons to gestures (#31819) · fea2c7d6
      Tong Mu authored
      * Revert "Revert "Add buttons to gestures (#30339)" (#31801)"
      
      This reverts commit 8fd7fa49.
      
      * Synthesise kPrimaryButton for unknown devices
      
      * Change TestPointer to a better API
      fea2c7d6
  22. 29 Apr, 2019 2 commits
  23. 22 Apr, 2019 1 commit
  24. 11 Apr, 2019 1 commit
  25. 05 Apr, 2019 1 commit
  26. 04 Apr, 2019 2 commits
    • Tong Mu's avatar
      Touching the screen adds `0x01` to buttons (#30457) · 13101c1a
      Tong Mu authored
      * Add constants `kPrimaryButton`, `kTouchContact` and `kStylusContact`
      * PointerDownEvent and PointerMoveEvent will always set the 0x01 bit on buttons
      13101c1a
    • Tong Mu's avatar
      Fix edge cases of PointerEventConverter (#29998) · 423cf223
      Tong Mu authored
      * Fix: ui.PointerChange.remove might contain position change, but we used to expand it into a Cancel and Remove, neither of which allows position change. A Hover event is added, and a test is updated accordingly.
      * Fixed the issue where a PointerMoveEvent and a PointerCancelEvent do not receive the correct pressure.
      * Refactor the calculation of delta into deltaTo.
      423cf223
  27. 27 Mar, 2019 1 commit
  28. 11 Mar, 2019 1 commit
    • stuartmorgan's avatar
      Add support for scrollwheels (#22762) · 5922a40e
      stuartmorgan authored
      Adds support for discrete scroll events, such as those sent by a scroll wheel.
      
      Includes the plumbing to convert, dispatch, and handle these events, as well as
      Scrollable support for consuming them.
      5922a40e
  29. 09 Mar, 2019 1 commit