- 20 Aug, 2020 1 commit
-
-
Tong Mu authored
* Redesigns the interface between MouseTracker and RendererBinding&RenderView. * Simplifies the structure of RenderMouseRegion. * Extracts the common utility code between mouse_tracker_test and mouse_tracker_cursor_test.
-
- 13 Jul, 2020 1 commit
-
-
Tong Mu authored
-
- 07 Jul, 2020 1 commit
-
-
Tong Mu authored
-
- 11 Jun, 2020 1 commit
-
-
Alexandre Ardhuin authored
* add language version 2.8 in packages/flutter * enable non-nullable analyzer flag
-
- 14 May, 2020 1 commit
-
-
Tong Mu authored
* Uses a special cursor value MouseCursor.defer to mark deferring. MouseTrackerAnnotation.cursor is now non-null. The mouseCursor argument of widgets or render objects can be null, which indicates using the default value. * Moves SystemMouseCursors.uncontrolled to MouseCursor.uncontrolled. * Changes how MouseCursor.debugDescription is defined. Previously MouseCursor.toString returns $runtimeType($debugDescription), while now it returns $debugDescription. Implementations of classes are updated, except for the ones of MouseCursor.defer and MouseCursor.uncontrolled are simply "defer" and "uncontrolled".
-
- 11 May, 2020 1 commit
-
-
Tong Mu authored
Adds the basic framework for the mouse cursor system. * Adds MouseRegion.cursor * Adds SystemMouseCursors * Adds mouseCursor to some widgets
-
- 10 Apr, 2020 1 commit
-
-
Alexandre Ardhuin authored
* replace simple Container(w & h) with SizedBox * address review comments * address review comments
-
- 28 Jan, 2020 1 commit
-
-
Tong Mu authored
-
- 24 Jan, 2020 1 commit
-
-
Tong Mu authored
-
- 16 Dec, 2019 1 commit
-
-
Alexandre Ardhuin authored
-
- 02 Dec, 2019 1 commit
-
-
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.
-
- 27 Nov, 2019 1 commit
-
-
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
-
- 13 Nov, 2019 1 commit
-
-
Tong Mu authored
* Add opaque to barriers * Detect opaque and test
-
- 11 Oct, 2019 1 commit
-
- 10 Oct, 2019 1 commit
-
-
Tong Mu authored
* Adds a new parameter bool opaque to MouseRegion * The same to RenderMouseRegion and AnnotatedRegionLayer * Add findAnnotations to Layer
-
- 26 Sep, 2019 1 commit
-
-
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.
-
- 24 Sep, 2019 1 commit
-
-
Alexandre Ardhuin authored
-
- 29 Aug, 2019 1 commit
-
-
Tong Mu authored
* Add FlagsSummary and implement Listener
-
- 08 Aug, 2019 2 commits
-
-
Tong Mu authored
This PR fixes an issue where MouseRegion crashes when being passed with closures instead of methods. It changes how a RenderMouseRegion handles its MouseTrackingAnnotation. Instead of creating a new annotation every time it becomes active and destroys it when deactivated, it now creates an annotation during the constructor and holds onto it until the end of its lifecycle. Instead of directly passing the argument callbacks to the annotation, it proxies them using methods.
-
Tong Mu authored
Fix an issue where MouseRegion will render its children twice.
-
- 07 Aug, 2019 1 commit
-
-
Tong Mu authored
Guard removePointer with addTearDown to avoid cascading test crash.
-
- 01 Aug, 2019 1 commit
-
-
Tong Mu authored
- Splits on{Enter,Hover,Exit} from Listener to MouseRegion. Deprecated API is kept for compatibility. - Splits on{Enter,Hover,Exit} from RenderPointerListener to RenderMouseRegion.
-
- 31 May, 2019 1 commit
-
-
Michael Goderbauer authored
-
- 30 May, 2019 1 commit
-
-
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.
-
- 15 May, 2019 1 commit
-
-
Greg Spencer authored
This fixes propagation of needsCompositing from child widgets. When needsCompositing is turned on by a child widget, it necessarily sets the needsCompositing bit of its parent widget, but RenderPointerListener was ignoring that piece of information and only turning on compositing if it thought it needed it for itself. This corrects that, and adds a test for the condition, and updates a test that was affected by the change. Fixes #32525 (again)
-
- 13 May, 2019 1 commit
-
-
Greg Spencer authored
This fixes #32525, because it now marks the compositing bits as needing to be recalculated if the mouse tracker changes its idea of whether or not a mouse is attached. This bug occurred because the test framework was leaking state from one test to the next (the state about whether a mouse pointer was active), and so even though there was a "passing" test when run in order with the other tests in the file, when the test was run individually (or first), it would have failed and caught the bug. This adds an assert to make sure that after each test there are no simulated mouse pointers connected, and now calls removePointer in all of the tests where this was a problem.
-
- 09 May, 2019 2 commits
-
-
Phil Quitslund authored
* update immutable to const * => const lists * revert making list const * make Centers const
-
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.
-
- 08 May, 2019 1 commit
-
-
Greg Spencer authored
I recently added some code to keep hover events from being propagated when a mouse wasn't attached. While that works, there are times when it can fire callbacks during the building of other components, since they can now be called from detach/attach. This is not ideal, since it will assert then. This changes the code so that it won't update the annotations during attach/detach, but also won't push the annotation layer unless a mouse is connected, achieving the same result as before, but with better semantics. The basic problem is that in the detach for RenderPointerListener, it would detach the annotation, which could cause onExit to be called on the annotation, since the widget was disappearing under the mouse, and thus needs to receive an onExit, but that onExit might be (and probably will be) calling setState, which marks the owning widget as needing to be built, sometimes when it already has been. The fix creates a new _ListenerElement that overrides activate and deactivate in order to tell the render object ahead of the detach that it might be detached, and so the onExit gets called before the detach instead of during it. In addition, I now avoid scheduling more than one check for mouse positions per frame.
-
- 06 May, 2019 1 commit
-
-
Michael Goderbauer authored
-
- 11 Apr, 2019 1 commit
-
-
Greg Spencer authored
Adds a paint after detaching/attaching hover annotations to keep the annotation layers in sync with the annotations attached to the mouse detector. Fixes #30744
-
- 11 Mar, 2019 1 commit
-
-
Dwayne Slater authored
* Fix MouseTracker annotation leak Map's remove method is typed `remove(Object key)`, which can cause bugs. Modified the existing test to check if the annotation has been removed from MouseTracker.
-
- 01 Mar, 2019 1 commit
-
-
Alexandre Ardhuin authored
* add trailing commas on list/map/parameters * add trailing commas on Invocation with nb of arg>1 * add commas for widget containing widgets * add trailing commas if instantiation contains trailing comma * revert bad change
-
- 29 Jan, 2019 1 commit
-
-
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
-
- 12 Sep, 2018 1 commit
-
-
Alexandre Ardhuin authored
* enable lint unnecessary_new * fix tests * fix tests * fix tests
-
- 07 Sep, 2017 1 commit
-
-
Ian Hickson authored
-
- 07 Apr, 2017 1 commit
-
-
Ian Hickson authored
Aggressively apply the const lint.
-
- 08 Mar, 2017 1 commit
-
-
Alexandre Ardhuin authored
-
- 04 Mar, 2017 1 commit
-
-
Chris Bracken authored
-
- 07 Nov, 2016 1 commit
-
-
Ian Hickson authored
-