From 2601177eb369c55f6d82a0887859f4f991b97a2f Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Mon, 25 Nov 2024 14:04:11 +0100 Subject: [PATCH] Revert unnecessary changes --- masonry/src/passes/event.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/masonry/src/passes/event.rs b/masonry/src/passes/event.rs index 288bcdc78..3a9e3c23a 100644 --- a/masonry/src/passes/event.rs +++ b/masonry/src/passes/event.rs @@ -22,10 +22,9 @@ fn get_target_widget( if let Some(pointer_pos) = pointer_pos { // TODO - Apply scale? let pointer_pos = (pointer_pos.x, pointer_pos.y).into(); - let root_widget = root.get_root_widget(); - return root_widget - .widget - .find_widget_at_pos(root_widget.ctx, pointer_pos) + return root + .get_root_widget() + .find_widget_at_pos(pointer_pos) .map(|widget| widget.id()); }