windows: ignore spurious mouse move messages (#1435)
Fixes https://github.com/rust-windowing/winit/issues/1428
This commit is contained in:
parent
b8326f6452
commit
71bd6e73ca
3 changed files with 23 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{
|
||||
dpi::Size,
|
||||
dpi::{PhysicalPosition, Size},
|
||||
platform_impl::platform::{event_loop, icon::WinIcon, util},
|
||||
window::{CursorIcon, Fullscreen, WindowAttributes},
|
||||
};
|
||||
|
|
@ -48,6 +48,7 @@ pub struct MouseProperties {
|
|||
pub cursor: CursorIcon,
|
||||
pub buttons_down: u32,
|
||||
cursor_flags: CursorFlags,
|
||||
pub last_position: Option<PhysicalPosition<f64>>,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
|
|
@ -106,6 +107,7 @@ impl WindowState {
|
|||
cursor: CursorIcon::default(),
|
||||
buttons_down: 0,
|
||||
cursor_flags: CursorFlags::empty(),
|
||||
last_position: None,
|
||||
},
|
||||
|
||||
min_size: attributes.min_inner_size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue