diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 4ee016ee6e..519007da7a 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -2628,6 +2628,9 @@ impl Hud { WinEvent::Moved(_) => { // Prevent the cursor from being grabbed while the window is being moved as this // causes the window to move erratically + // TODO: this creates an issue where if you move the window then you need to + // close a menu to re-grab the mouse (and if one isn't already + // open you need to open and close a menu) self.show.want_grab = false; true }, diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index d271ca5b95..b898254864 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -941,6 +941,10 @@ impl Window { self.scale_factor = scale_factor; self.events.push(Event::ScaleFactorChanged(scale_factor)); }, + WindowEvent::Moved(winit::dpi::PhysicalPosition { x, y }) => { + self.events + .push(Event::Moved(Vec2::new(x as u32, y as u32))); + }, WindowEvent::ReceivedCharacter(c) => self.events.push(Event::Char(c)), WindowEvent::MouseInput { button, state, .. } => { if let (true, Some(game_inputs)) =