diff --git a/CHANGELOG.md b/CHANGELOG.md index c8be853d..5aa8af25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/platform_impl/linux/x11/event_processor.rs b/src/platform_impl/linux/x11/event_processor.rs index 8c27eefa..9a31a266 100644 --- a/src/platform_impl/linux/x11/event_processor.rs +++ b/src/platform_impl/linux/x11/event_processor.rs @@ -834,14 +834,15 @@ impl EventProcessor { } } } - 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,