mirror of
https://github.com/servo/servo.git
synced 2025-07-17 12:23:40 +01:00
Auto merge of #15568 - samgiles:15513-space-scroll, r=asajeffrey
Fix #15513: Stop spacebar scrolling directly from the glutin window. This completely removes spacebar scrolling using the current method, fixing #15513. See #15513 for a discussion, as the _right thing to do_ is perhaps a UX problem - and perhaps worth a follow up. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15513. No tests for these changes yet, as I'm just kicking off a discussion about how this should work. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15568) <!-- Reviewable:end -->
This commit is contained in:
commit
eb8d0c3df8
1 changed files with 2 additions and 4 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue