Skip to content

Commit

Permalink
Do not propagate_to_hidden RouteFocusChanged events
Browse files Browse the repository at this point in the history
Hidden widgets can't have focus, so they don't need to know about focus changes.
  • Loading branch information
smmalis37 authored Dec 1, 2024
1 parent b831b5f commit 8efebe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions druid/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,9 @@ impl InternalLifeCycle {
pub fn should_propagate_to_hidden(&self) -> bool {
match self {
InternalLifeCycle::RouteWidgetAdded
| InternalLifeCycle::RouteFocusChanged { .. }
| InternalLifeCycle::RouteDisabledChanged => true,
InternalLifeCycle::RouteViewContextChanged { .. } => false,
InternalLifeCycle::RouteViewContextChanged { .. }
| InternalLifeCycle::RouteFocusChanged { .. } => false,
InternalLifeCycle::DebugRequestState { .. }
| InternalLifeCycle::DebugRequestDebugState { .. }
| InternalLifeCycle::DebugInspectState(_) => true,
Expand Down

0 comments on commit 8efebe9

Please sign in to comment.