Skip to content

Commit

Permalink
Prioritize higher layer interaction if not idle
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Feb 18, 2023
1 parent dfad268 commit 01fb0b5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions native/src/overlay/nested.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,16 @@ where
mouse::Interaction::default()
};

element
.mouse_interaction(layout, cursor_position, viewport, renderer)
.max(interaction)
if matches!(interaction, mouse::Interaction::Idle) {
element.mouse_interaction(
layout,
cursor_position,
viewport,
renderer,
)
} else {
interaction
}
}

self.overlay.with_element_mut(|element| {
Expand Down

0 comments on commit 01fb0b5

Please sign in to comment.