Skip to content

Commit

Permalink
Rename enum variant
Browse files Browse the repository at this point in the history
  • Loading branch information
PoignardAzur committed Aug 30, 2024
1 parent c9900e6 commit bc1da54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion masonry/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub enum StatusChange {
FocusChanged(bool),

/// Called when a widget becomes or no longer is parent of a focused widget.
HasFocusChanged(bool),
ChildFocusChanged(bool),
}

impl PointerEvent {
Expand Down
2 changes: 1 addition & 1 deletion masonry/src/passes/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub(crate) fn run_update_focus_pass(root: &mut RenderRoot, root_state: &mut Widg
let has_focus = focused_set.contains(&ctx.widget_id());

if ctx.widget_state.has_focus != has_focus {
widget.on_status_change(ctx, &StatusChange::HasFocusChanged(has_focus));
widget.on_status_change(ctx, &StatusChange::ChildFocusChanged(has_focus));
}
ctx.widget_state.has_focus = has_focus;
});
Expand Down

0 comments on commit bc1da54

Please sign in to comment.