Update changelog and make the argument of `WinitEventsHandler fn moved()` a LogicalPosition

This commit is contained in:
Lucas Timmins 2018-09-26 21:42:51 +08:00
parent 673f0cd0aa
commit 2e9096923e
2 changed files with 4 additions and 2 deletions

View File

@ -2,6 +2,8 @@
## Unreleased
- **[Breaking]** WinitBackend: Upgrade to winit 0.17
## version 0.1.0 (2017-10-01)
### Protocol handling

View File

@ -195,7 +195,7 @@ pub trait WinitEventsHandler {
/// The window was resized, can be used to adjust the associated `wayland::output::Output`s mode.
fn resized(&mut self, size: LogicalSize);
/// The window was moved
fn moved(&mut self, x: i32, h: i32);
fn moved(&mut self, position: LogicalPosition);
/// The window gained or lost focus
fn focus_changed(&mut self, focused: bool);
/// The window needs to be redrawn
@ -714,7 +714,7 @@ impl InputBackend for WinitInputBackend {
}
}
(WindowEvent::Moved(position), _, Some(events_handler)) => {
events_handler.moved(position.x as i32, position.y as i32)
events_handler.moved(position)
}
(WindowEvent::Focused(focus), _, Some(events_handler)) => {
events_handler.focus_changed(focus)