aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-06 12:03:32 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-06 12:03:32 -0700
commite781cb4d0c49905d250a4f1a91dcc09b4d3927c4 (patch)
tree628960e86e86398510f2482fd8b0952a8ddc4fd7
parentc828e8360416e61deaaf6870ebdf9ee2f0abc19b (diff)
parentb0329ac241609c618ce268fa5ba457eb491863f8 (diff)
downloadservo-e781cb4d0c49905d250a4f1a91dcc09b4d3927c4.tar.gz
servo-e781cb4d0c49905d250a4f1a91dcc09b4d3927c4.zip
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.
-rw-r--r--ports/glfw/window.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/ports/glfw/window.rs b/ports/glfw/window.rs
index f748fc67e44..69f5dd1a83f 100644
--- a/ports/glfw/window.rs
+++ b/ports/glfw/window.rs
@@ -225,8 +225,18 @@ impl Window {
let hidpi = (backing_size as f32) / (window_size as f32);
let x = x 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) => {