New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unique device id for trackpad on web #39260
Conversation
@@ -1330,6 +1334,7 @@ void testMain() { | |||
packets[4].data[0].signalKind, equals(ui.PointerSignalKind.scroll)); | |||
expect( | |||
packets[4].data[0].kind, equals(ui.PointerDeviceKind.trackpad)); | |||
expect(packets[4].data[0].pointerIdentifier, equals(-2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh 🤦♀️ - thanks. Still recovering from jet lag.
I think the test problem is that now there are two different device IDs, so the first mouse event will have a synthesized add event. |
Wrong button 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hmm. I will take another look tomorrow. Thanks! |
@moffatman did you mean that the test just need to be updated? I figured the prior synthesized event may need to be removed or cancelled, but that doesn't seem right. There could be a mouse and a trackpad both at play at the same time. |
Yeah, the test just needs to be updated for the new behaviour. packets[5] now has [add, scroll] instead of just [scroll]. Since it's now using a different device ID from the earlier events. |
…120656) * 8cd648d1d Roll Dart SDK from f80c5db8736a to ea59504416a8 (1 revision) (flutter/engine#39594) * 9ac09ced1 [Impeller] Fix unsafe access for clip stencil coverage (flutter/engine#39595) * 99a81a81f Add support for double tap action from Apple Pencil 2 (flutter/engine#39267) * 89d41d13e Add unique device id for trackpad on web (flutter/engine#39260) * f7dfb2b63 remove use of SkCanvas and DLCanvasRecorder from ui.Canvas native code (flutter/engine#39599) * c2e165e36 Fix multi-function compute (flutter/engine#39603) * c4f51bc78 Revert "Add support for double tap action from Apple Pencil 2 (#39267)" (flutter/engine#39607)
* Unique device id for trackpad on web * ++
Fixes flutter/flutter#118051
After #36346, it was possible to trip an assertion in the framework since we were differentiating mouse & trackpad on web - but weren't giving them unique IDs. This adds that.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.