mirror of
https://github.com/servo/servo.git
synced 2025-08-25 07:08:21 +01:00
remove forcetouch support
This commit is contained in:
parent
019fdaa1bd
commit
e7c754fb64
12 changed files with 7 additions and 240 deletions
|
@ -23,7 +23,7 @@ use msg::constellation_msg::{KeyModifiers, KeyState, TraversalDirection};
|
|||
use net_traits::net_error_list::NetError;
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
use osmesa_sys;
|
||||
use script_traits::{LoadData, TouchEventType, TouchpadPressurePhase};
|
||||
use script_traits::{LoadData, TouchEventType};
|
||||
use servo::ipc_channel::ipc::IpcSender;
|
||||
use servo_config::opts;
|
||||
use servo_config::prefs::PREFS;
|
||||
|
@ -518,12 +518,6 @@ impl Window {
|
|||
let point = TypedPoint2D::new(touch.location.0 as f32, touch.location.1 as f32);
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Touch(phase, id, point));
|
||||
}
|
||||
Event::TouchpadPressure(pressure, stage) => {
|
||||
let m = self.mouse_pos.get();
|
||||
let point = TypedPoint2D::new(m.x as f32, m.y as f32);
|
||||
let phase = glutin_pressure_stage_to_touchpad_pressure_phase(stage);
|
||||
self.event_queue.borrow_mut().push(WindowEvent::TouchpadPressure(point, pressure, phase));
|
||||
}
|
||||
Event::Refresh => {
|
||||
self.event_queue.borrow_mut().push(WindowEvent::Refresh);
|
||||
}
|
||||
|
@ -1371,16 +1365,6 @@ fn glutin_phase_to_touch_event_type(phase: TouchPhase) -> TouchEventType {
|
|||
}
|
||||
}
|
||||
|
||||
fn glutin_pressure_stage_to_touchpad_pressure_phase(stage: i64) -> TouchpadPressurePhase {
|
||||
if stage < 1 {
|
||||
TouchpadPressurePhase::BeforeClick
|
||||
} else if stage < 2 {
|
||||
TouchpadPressurePhase::AfterFirstClick
|
||||
} else {
|
||||
TouchpadPressurePhase::AfterSecondClick
|
||||
}
|
||||
}
|
||||
|
||||
fn is_printable(key_code: VirtualKeyCode) -> bool {
|
||||
use glutin::VirtualKeyCode::*;
|
||||
match key_code {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue