prevent the mode from changing during a click (#273)

Fixes mouse buttons getting stuck if trigger is released in a different
mode than the initial click.
This commit is contained in:
Orion
2025-11-24 06:26:44 +01:00
committed by GitHub
parent e390634d4f
commit a6da79bf3d

View File

@@ -72,6 +72,8 @@ impl InputState {
hand.last_click = Instant::now();
}
// Prevent the mode from changing during a click
if !hand.before.click {
if hand.now.click_modifier_right {
hand.interaction.mode = PointerMode::Right;
continue;
@@ -109,6 +111,7 @@ impl InputState {
}
_ => {}
}
}
if hand.now.alt_click != hand.before.alt_click {
// Reap previous processes