1. 11 Jun, 2020 2 commits
  2. 11 May, 2020 1 commit
    • Tong Mu's avatar
      System mouse cursors (#54171) · 7f8cb7f8
      Tong Mu authored
      Adds the basic framework for the mouse cursor system. 
      
      * Adds MouseRegion.cursor
      * Adds SystemMouseCursors
      * Adds mouseCursor to some widgets
      7f8cb7f8
  3. 08 Apr, 2020 1 commit
  4. 20 Mar, 2020 1 commit
  5. 28 Jan, 2020 1 commit
  6. 16 Dec, 2019 1 commit
  7. 05 Dec, 2019 1 commit
  8. 02 Dec, 2019 1 commit
    • Tong Mu's avatar
      Improve MouseTracker lifecycle: Move checks to post-frame (#44631) · afb8f382
      Tong Mu authored
      This PR rewrites MouseTracker's lifecycle, so that mouse callbacks are all triggered in post frame, instead of the current one where some are triggered during the build phase. This PR also changes the onExit callback to MouseRegion, RenderMouseRegion, and MouseTrackerAnnotation, so that it is no longer triggered on dispose.
      afb8f382
  9. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      Ian Hickson authored
      * Update project.pbxproj files to say Flutter rather than Chromium
      
      Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.
      
      * Update the copyright notice checker to require a standard notice on all files
      
      * Update copyrights on Dart files. (This was a mechanical commit.)
      
      * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.
      
      Some were already marked "The Flutter Authors", not clear why. Their
      dates have been normalized. Some were missing the blank line after the
      license. Some were randomly different in trivial ways for no apparent
      reason (e.g. missing the trailing period).
      
      * Clean up the copyrights in non-Dart files. (Manual edits.)
      
      Also, make sure templates don't have copyrights.
      
      * Fix some more ORGANIZATIONNAMEs
      449f4a66
  10. 20 Nov, 2019 1 commit
  11. 11 Oct, 2019 1 commit
  12. 10 Oct, 2019 3 commits
  13. 03 Oct, 2019 1 commit
  14. 26 Sep, 2019 1 commit
    • 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
  15. 24 Sep, 2019 1 commit
  16. 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
  17. 09 May, 2019 1 commit
    • 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
  18. 11 Apr, 2019 1 commit
  19. 27 Mar, 2019 1 commit
  20. 29 Jan, 2019 1 commit
    • Greg Spencer's avatar
      Implement hover support for mouse pointers. (#24830) · 1811d574
      Greg Spencer authored
      This implements support for hovering mouse pointers, so that mice connected to Android devices, and ChromeOS devices running Android apps will work properly.
      
      It teaches flutter_test about hover events, which required changing how they are created and used.
      
      Also modifies AnnotatedRegion to allow a region that can be located someplace other than just the origin.
      
      Along with tests for all of the above.
      
      Fixes #5504
      1811d574