-
由 Chris Bracken 提交于
This corrects the button state emitted on synthetic pointer move and hover events generated by the engine. When an embedder notifies the engine of a pointer up or down event, and the pointer's position has changed since the last move or hover event, `PointerDataPacketConverter` generates a synthetic move or hover to notify the framework of the change in position. In these cases, the current event from the embedder contains the new button state *after* the pointer up/down event, but the move/hover needs to be synthesized such that it occurs *before* the pointer up/down, with the previous button state. This patch stores the button state after each pointer down, up, move, or hover event such that it can be used by the next event if a synthetic event must be issued. The bug in the previous logic was revealed by the release of macOS 11 (Big Sur), which appears to issue move events between mouse down and mouse up, which did not use to be the case. This fixes https://github.com/flutter/flutter/issues/64961, which is the desktop-specific tracking bug for the more general Big Sur mouse click umbrella issue https://github.com/flutter/flutter/issues/71190.
69d7e8eb