Web: don't block pen input (#3813)
This commit is contained in:
parent
c9c260ca08
commit
5ec934b1b0
5 changed files with 32 additions and 135 deletions
|
|
@ -244,21 +244,10 @@ impl Shared {
|
|||
return;
|
||||
}
|
||||
|
||||
let pointer_type = event.pointer_type();
|
||||
|
||||
if pointer_type != "mouse" {
|
||||
return;
|
||||
}
|
||||
|
||||
// chorded button event
|
||||
let device_id = RootDeviceId(DeviceId(event.pointer_id()));
|
||||
|
||||
if let Some(button) = backend::event::mouse_button(&event) {
|
||||
debug_assert_eq!(
|
||||
pointer_type, "mouse",
|
||||
"expect pointer type of a chorded button event to be a mouse"
|
||||
);
|
||||
|
||||
let state = if backend::event::mouse_buttons(&event).contains(button.into()) {
|
||||
ElementState::Pressed
|
||||
} else {
|
||||
|
|
@ -322,10 +311,6 @@ impl Shared {
|
|||
return;
|
||||
}
|
||||
|
||||
if event.pointer_type() != "mouse" {
|
||||
return;
|
||||
}
|
||||
|
||||
let button = backend::event::mouse_button(&event).expect("no mouse button pressed");
|
||||
runner.send_event(Event::DeviceEvent {
|
||||
device_id: RootDeviceId(DeviceId(event.pointer_id())),
|
||||
|
|
@ -345,10 +330,6 @@ impl Shared {
|
|||
return;
|
||||
}
|
||||
|
||||
if event.pointer_type() != "mouse" {
|
||||
return;
|
||||
}
|
||||
|
||||
let button = backend::event::mouse_button(&event).expect("no mouse button pressed");
|
||||
runner.send_event(Event::DeviceEvent {
|
||||
device_id: RootDeviceId(DeviceId(event.pointer_id())),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue