mirror of
https://github.com/servo/servo.git
synced 2025-07-19 21:33:49 +01:00
servoshell: Send all button events to the WebView
regardless of what button is pressed (#38053)
Sending all mouse button events (Left, Right, Middle, Back, Forward) to the constellation for processing. Before, only left and right mouse buttons were handled. Testing: There is no new test for this. Manually testing was done. We currently do not have a good way to test user interaction in servoshell. Fixes: #37996 Signed-off-by: abdelrahman1234567 <abdelrahman.hossameldin.awadalla@huawei.com>
This commit is contained in:
parent
cbdf72b4eb
commit
2ea95c8813
1 changed files with 1 additions and 3 deletions
|
@ -594,9 +594,7 @@ impl WindowPortsMethods for Window {
|
|||
WindowEvent::KeyboardInput { event, .. } => self.handle_keyboard_input(state, event),
|
||||
WindowEvent::ModifiersChanged(modifiers) => self.modifiers_state.set(modifiers.state()),
|
||||
WindowEvent::MouseInput { state, button, .. } => {
|
||||
if button == MouseButton::Left || button == MouseButton::Right {
|
||||
self.handle_mouse(&webview, button, state);
|
||||
}
|
||||
},
|
||||
WindowEvent::CursorMoved { position, .. } => {
|
||||
let mut point = winit_position_to_euclid_point(position).to_f32();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue