Make focusing the parent an effect to avoid querying ancestors
This commit is contained in:
parent
d6b0569bed
commit
80ad59a620
5 changed files with 53 additions and 33 deletions
|
@ -1770,7 +1770,7 @@ impl View for Pane {
|
|||
self.render_blank_pane(&theme, cx)
|
||||
})
|
||||
.on_down(MouseButton::Left, |_, _, cx| {
|
||||
cx.focus_parent_view();
|
||||
cx.focus_parent();
|
||||
})
|
||||
.into_any()
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ impl View for SharedScreen {
|
|||
.contained()
|
||||
.with_style(cx.global::<Settings>().theme.shared_screen)
|
||||
})
|
||||
.on_down(MouseButton::Left, |_, _, cx| cx.focus_parent_view())
|
||||
.on_down(MouseButton::Left, |_, _, cx| cx.focus_parent())
|
||||
.into_any()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue