mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
auto merge of #3892 : evilpie/servo/master, r=glennw
I am not sure if this is the same key everywhere, but this works on Linux. Google didn't produce useful results for me.
This commit is contained in:
commit
e781cb4d0c
1 changed files with 12 additions and 2 deletions
|
@ -225,8 +225,18 @@ impl Window {
|
||||||
let hidpi = (backing_size as f32) / (window_size as f32);
|
let hidpi = (backing_size as f32) / (window_size as f32);
|
||||||
let x = x as f32 * hidpi;
|
let x = x as f32 * hidpi;
|
||||||
let y = y as f32 * hidpi;
|
let y = y as f32 * hidpi;
|
||||||
if button == glfw::MouseButtonLeft || button == glfw::MouseButtonRight {
|
|
||||||
self.handle_mouse(button, action, x as i32, y as i32);
|
match button {
|
||||||
|
glfw::MouseButton5 => { // Back button (might be different per platform)
|
||||||
|
self.event_queue.borrow_mut().push(NavigationWindowEvent(Back));
|
||||||
|
},
|
||||||
|
glfw::MouseButton6 => { // Forward
|
||||||
|
self.event_queue.borrow_mut().push(NavigationWindowEvent(Forward));
|
||||||
|
},
|
||||||
|
glfw::MouseButtonLeft | glfw::MouseButtonRight => {
|
||||||
|
self.handle_mouse(button, action, x as i32, y as i32);
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
glfw::CursorPosEvent(xpos, ypos) => {
|
glfw::CursorPosEvent(xpos, ypos) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue