Skip to content

Commit 3c9f417

Browse files
authored
Revert "Fix crash from alt-tab'ing just after startup (#102453)" (#103074)
This reverts commit 74e9a6d.
1 parent 74e9a6d commit 3c9f417

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

packages/flutter/lib/src/rendering/mouse_tracker.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ class MouseTracker extends ChangeNotifier {
319319
// so that [mouseIsConnected], which is decided by `_mouseStates`, is
320320
// correct during the callbacks.
321321
if (existingState == null) {
322-
if (event is PointerRemovedEvent)
323-
return;
322+
assert(event is! PointerRemovedEvent);
324323
_mouseStates[device] = _MouseState(initialEvent: event);
325324
} else {
326325
assert(event is! PointerAddedEvent);

packages/flutter/test/rendering/mouse_tracker_test.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,6 @@ void main() {
133133
listenerLogs.clear();
134134
});
135135

136-
// Regression test for https://github.com/flutter/flutter/issues/90838
137-
test('should not crash if the first event is a Removed event', () {
138-
final List<PointerEvent> events = <PointerEvent>[];
139-
_setUpWithOneAnnotation(logEvents: events);
140-
ui.window.onPointerDataPacket!(ui.PointerDataPacket(data: <ui.PointerData>[
141-
_pointerData(PointerChange.remove, Offset.zero),
142-
]));
143-
events.clear();
144-
});
145-
146136
test('should correctly handle multiple devices', () {
147137
final List<PointerEvent> events = <PointerEvent>[];
148138
setUpWithOneAnnotation(logEvents: events);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy