X11: Fix CursorEntered event for non-winit window (#1320)

* X11: Fix CursorEntered event for non-winit window

* Retry CI

Co-authored-by: Osspial <osspial@gmail.com>
This commit is contained in:
Murarth 2019-12-21 17:47:29 -07:00 committed by Freya Gentz
parent 38c8cb9f4a
commit 2f352ca5cf
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,6 @@
# Unreleased
- On X11, fix `CursorEntered` event being generated for non-winit windows.
- On macOS, fix crash when starting maximized without decorations.
- On macOS, fix application not to terminate on `run_return`.
- On Wayland, fix cursor icon updates on window borders when using CSD.

View file

@ -834,14 +834,15 @@ impl<T: 'static> EventProcessor<T> {
}
}
}
callback(Event::WindowEvent {
window_id,
event: CursorEntered { device_id },
});
if let Some(dpi_factor) =
self.with_window(xev.event, |window| window.hidpi_factor())
{
callback(Event::WindowEvent {
window_id,
event: CursorEntered { device_id },
});
let position = LogicalPosition::from_physical(
(xev.event_x as f64, xev.event_y as f64),
dpi_factor,