Skip to content

Commit

Permalink
fix type confusion in CursorMoved logic
Browse files Browse the repository at this point in the history
  • Loading branch information
delan committed Sep 13, 2023
1 parent a9e9c9c commit 69138c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ports/servoshell/headed_window.rs
Expand Up @@ -407,9 +407,9 @@ impl WindowPortsMethods for Window {
}
},
winit::event::WindowEvent::CursorMoved { position, .. } => {
let toolbar_height = self.toolbar_height.get() * self.hidpi_factor();
let mut position = winit_position_to_euclid_point(position).to_f32();
// TODO(servo#30049) make this type-safe (see servo/euclid#388)
position.y -= self.toolbar_height.get().get();
position -= Size2D::from_lengths(Length::zero(), toolbar_height);
self.mouse_pos.set(position.to_i32());
self.event_queue
.borrow_mut()
Expand Down

0 comments on commit 69138c0

Please sign in to comment.