mirror of
https://github.com/danbulant/cushy
synced 2026-06-20 06:51:07 +00:00
WrapperWidget::root_behavior default passthrough
This commit is contained in:
parent
8eaf0f414f
commit
2becb92f04
2 changed files with 9 additions and 1 deletions
|
|
@ -34,6 +34,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `Window::focused` now accepts an `IntoValue` implementor instead of
|
||||
`IntoDynamic`. Additionally, the initial value is now used to control whether
|
||||
the OS should initially activate the window when it is opened.
|
||||
- `WrapperWidget::root_behavior`'s provided implementation now returns
|
||||
`Some(RootBehavior::PassThrough)` to reflect the general intention of what
|
||||
`WrapperWidget` implementors are generally doing. Previously, `None` was
|
||||
returned.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
|
|
@ -532,9 +532,13 @@ pub trait WrapperWidget: Debug + Send + 'static {
|
|||
|
||||
/// Returns the behavior this widget should apply when positioned at the
|
||||
/// root of the window.
|
||||
///
|
||||
/// The provided implementation for `WrapperWidget` returns
|
||||
/// [`RootBehavior::PassThrough`]. This is different from the provided
|
||||
/// implementation for [`Widget`].
|
||||
#[allow(unused_variables)]
|
||||
fn root_behavior(&mut self, context: &mut EventContext<'_>) -> Option<RootBehavior> {
|
||||
None
|
||||
Some(RootBehavior::PassThrough)
|
||||
}
|
||||
|
||||
/// Draws the background of the widget.
|
||||
|
|
|
|||
Loading…
Reference in a new issue