mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
touch: Fix panic with -Zconvert-mouse-to-touch (#36531)
- We previously converted all mouse move events to touch events, but we should only be doing that while a mouse button is pressed (a finger always does touch-down -> move -> up / cancel) - Only consider Left mouse button for mouse-to-touch. We currently already hardcode TouchId 0, which we would need to change in order to properly support Multi-touch. Since we don't have any Multi-touch gestures at the moment, we leave this unimplemented and simply only evaluate the left mouse button. Testing: Manual testing. We don't have servodriver support yet. Fixes: #36526 Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
fe4306fc30
commit
1ea80c4335
2 changed files with 47 additions and 17 deletions
|
@ -282,6 +282,10 @@ impl TouchHandler {
|
|||
debug_assert!(old.is_some(), "Sequence already removed?");
|
||||
}
|
||||
|
||||
pub fn try_get_current_touch_sequence(&self) -> Option<&TouchSequenceInfo> {
|
||||
self.touch_sequence_map.get(&self.current_sequence_id)
|
||||
}
|
||||
|
||||
pub fn get_current_touch_sequence_mut(&mut self) -> &mut TouchSequenceInfo {
|
||||
self.touch_sequence_map
|
||||
.get_mut(&self.current_sequence_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue