Skip to content

Changing mouse buttons is incorrectly reported as PointerMoveEvent #29448

@dkwingsmt

Description

@dkwingsmt
  • Environment:
    • Flutter revision c942ed4
    • Running Gallery on Pixelbook

I added a log statement at the beginning of PrimaryPointerGestureRecognizer.handleEvent to print the target event,

    print('${event.pointer} ${event.toStringShort()} ${event.buttons}');

then perform the following operation using a mouse over any button:

  • Press RMB and hold
  • Press LMB and hold
  • Release RMB
  • Release LMB

And this is the log printed:

I/flutter ( 5111): 24 PointerDownEvent#adf1a 2
I/flutter ( 5111): 24 PointerMoveEvent#93ff8 3
I/flutter ( 5111): 24 PointerMoveEvent#735c8 1
I/flutter ( 5111): 24 PointerUpEvent#522ea 0

The middle 2 events are PointerMoveEvent, although there were only button changes and no movement. I kind of understand why this is the case, but maybe we want to distinguish the 2 cases or rename the event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: gesturesflutter/packages/flutter/gestures repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions