mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rework ScriptThread::handle_input_event
for behaviour and performance (#36619)
Rework `ScriptThread::handle_input_event` for correct behaviour and better performance 1. Only trigger click event with primary button, according to spec 2. Avoid unnecessary clone of `ConstellationInputEvent` This is a follow up of #36413 Testing: Manually tested. Right mouse won't trigger click event now. Fixes: #35666 cc @jdm @xiaochengh Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
76ee127af8
commit
990ed8891f
2 changed files with 31 additions and 33 deletions
|
@ -51,7 +51,7 @@ pub struct MouseButtonEvent {
|
|||
pub point: DevicePoint,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
pub enum MouseButton {
|
||||
Left,
|
||||
Middle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue