diff options
Diffstat (limited to 'ports/servoshell/desktop/minibrowser.rs')
-rw-r--r-- | ports/servoshell/desktop/minibrowser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ports/servoshell/desktop/minibrowser.rs b/ports/servoshell/desktop/minibrowser.rs index 38506501738..3b6ccc42922 100644 --- a/ports/servoshell/desktop/minibrowser.rs +++ b/ports/servoshell/desktop/minibrowser.rs @@ -132,7 +132,7 @@ impl Minibrowser { self.last_mouse_position = Some(winit_position_to_euclid_point(*position).to_f32() / scale); self.last_mouse_position - .is_some_and(|p| self.is_in_browser_rect(p)) + .is_some_and(|p| self.is_in_egui_toolbar_rect(p)) }, WindowEvent::MouseInput { state: ElementState::Pressed, @@ -154,14 +154,14 @@ impl Minibrowser { }, WindowEvent::MouseWheel { .. } | WindowEvent::MouseInput { .. } => self .last_mouse_position - .is_some_and(|p| self.is_in_browser_rect(p)), + .is_some_and(|p| self.is_in_egui_toolbar_rect(p)), _ => true, }; result } - /// Return true iff the given position is in the Servo browser rect. - fn is_in_browser_rect(&self, position: Point2D<f32, DeviceIndependentPixel>) -> bool { + /// Return true iff the given position is over the egui toolbar. + fn is_in_egui_toolbar_rect(&self, position: Point2D<f32, DeviceIndependentPixel>) -> bool { position.y < self.toolbar_height.get() } |