Skip to main content

focused_scope

Function focused_scope 

Source
pub fn focused_scope() -> Option<Scope>
Expand description

The scope owning the content of the window that currently has focus: the scope an app-wide command should resolve per-window state through (docs/state.md).

Falls back to the app’s primary window, which is the same rule focused_window states: a backend reports focus for the windows it opened, and “no record is focused” means the primary is key (on AppKit the primary’s delegate carries no node and never emits WindowFocused at all, so that IS the primary’s steady state). None only before boot and after the last window is gone.