Unverified Commit 3c9f4173 authored by Darren Austin's avatar Darren Austin Committed by GitHub

Revert "Fix crash from alt-tab'ing just after startup (#102453)" (#103074)

This reverts commit 74e9a6d9.
parent 74e9a6d9
......@@ -319,8 +319,7 @@ class MouseTracker extends ChangeNotifier {
// so that [mouseIsConnected], which is decided by `_mouseStates`, is
// correct during the callbacks.
if (existingState == null) {
if (event is PointerRemovedEvent)
return;
assert(event is! PointerRemovedEvent);
_mouseStates[device] = _MouseState(initialEvent: event);
} else {
assert(event is! PointerAddedEvent);
......
......@@ -133,16 +133,6 @@ void main() {
listenerLogs.clear();
});
// Regression test for https://github.com/flutter/flutter/issues/90838
test('should not crash if the first event is a Removed event', () {
final List<PointerEvent> events = <PointerEvent>[];
_setUpWithOneAnnotation(logEvents: events);
ui.window.onPointerDataPacket!(ui.PointerDataPacket(data: <ui.PointerData>[
_pointerData(PointerChange.remove, Offset.zero),
]));
events.clear();
});
test('should correctly handle multiple devices', () {
final List<PointerEvent> events = <PointerEvent>[];
setUpWithOneAnnotation(logEvents: events);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment