lastFocusedIdInFrameSince
Pass result from lastFocusedIdInFrame. Returns the id of a widget that
was focused between the two calls, if any.
If so, this means one of:
- a widget had focus when it called
WidgetData.register focusWidgetwith the id of the last widget to callWidgetData.registerfocusWidgetwith the id of a widget in the parent chain
If return is non null, can pass to eventMatch .focus_id to match key
events the focused widget got but didn't handle.
Only valid between Window.beginand Window.end.
Parameters
- prev:Id
- Id
Source
Implementation
pub fn lastFocusedIdInFrameSince(prev: Id) ?Id {
const last_focused_id = lastFocusedIdInFrame();
if (prev != last_focused_id) {
return last_focused_id;
} else {
return null;
}
}