ui-canvas: the host's gesture keeps its button in its last pointer only

This commit is contained in:
aiongg
2026-11-15 10:47:36 +00:00
parent 1b18c0b443
commit ebc8d95afd
+1 -2
View File
@@ -298,7 +298,6 @@ pub enum StandInKey {
struct Active {
/// The gesture's id, from `runtime::edit::next_gesture_id` when the tool claimed the press.
id: GestureId,
button: PointerButton,
last: ToolPointer,
/// The tool has had a `drag` call in this gesture.
dragged: bool,
@@ -1035,7 +1034,7 @@ impl<'a, 't: 'a> Run<'a, 't> {
self.ending = None;
match action {
ToolAction::Claimed => {
self.state.gesture = Some(Active { id, button: pointer.button, last: pointer, dragged: false, stand_in: who });
self.state.gesture = Some(Active { id, last: pointer, dragged: false, stand_in: who });
self.report(GesturePhase::Begin);
}
ToolAction::Done => {