Propagate mouse cursor movements in stack
This commit is contained in:
parent
2fc94d9f44
commit
7a6d4d580e
1 changed files with 6 additions and 1 deletions
|
|
@ -216,6 +216,8 @@ where
|
||||||
viewport: &Rectangle,
|
viewport: &Rectangle,
|
||||||
) {
|
) {
|
||||||
let is_over = cursor.is_over(layout.bounds());
|
let is_over = cursor.is_over(layout.bounds());
|
||||||
|
let is_mouse_movement =
|
||||||
|
matches!(event, Event::Mouse(mouse::Event::CursorMoved { .. }));
|
||||||
|
|
||||||
for ((child, state), layout) in self
|
for ((child, state), layout) in self
|
||||||
.children
|
.children
|
||||||
|
|
@ -235,7 +237,10 @@ where
|
||||||
viewport,
|
viewport,
|
||||||
);
|
);
|
||||||
|
|
||||||
if is_over && cursor != mouse::Cursor::Unavailable {
|
if is_over
|
||||||
|
&& !is_mouse_movement
|
||||||
|
&& cursor != mouse::Cursor::Unavailable
|
||||||
|
{
|
||||||
let interaction = child.as_widget().mouse_interaction(
|
let interaction = child.as_widget().mouse_interaction(
|
||||||
state, layout, cursor, viewport, renderer,
|
state, layout, cursor, viewport, renderer,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue