Fix #15513: Stop spacebar scrolling directly from the glutin window.

This commit is contained in:
Sam Giles 2017-02-15 18:08:02 +00:00
parent 216a89f776
commit d8afa93cef

View file

@ -1042,8 +1042,7 @@ impl WindowMethods for Window {
self.event_queue.borrow_mut().push(WindowEvent::Navigation(WindowNavigateMsg::Back)); self.event_queue.borrow_mut().push(WindowEvent::Navigation(WindowNavigateMsg::Back));
} }
(NONE, None, Key::PageDown) | (NONE, None, Key::PageDown) => {
(NONE, Some(' '), _) => {
let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0, let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0,
-self.framebuffer_size() -self.framebuffer_size()
.to_f32() .to_f32()
@ -1052,8 +1051,7 @@ impl WindowMethods for Window {
self.scroll_window(scroll_location, self.scroll_window(scroll_location,
TouchEventType::Move); TouchEventType::Move);
} }
(NONE, None, Key::PageUp) | (NONE, None, Key::PageUp) => {
(SHIFT, Some(' '), _) => {
let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0, let scroll_location = ScrollLocation::Delta(TypedPoint2D::new(0.0,
self.framebuffer_size() self.framebuffer_size()
.to_f32() .to_f32()