DVUI

focusedWidgetIdInCurrentSubwindow

Id of the focused widget (if any) in the current subwindow.

Only valid between Window.beginand Window.end.

Source

Implementation

#
pub fn focusedWidgetIdInCurrentSubwindow() ?Id {
    const cw = currentWindow();
    const sw = cw.subwindows.current() orelse blk: {
        log.warn("failed to find the focused subwindow, using base window\n", .{});
        break :blk &cw.subwindows.stack.items[0];
    };
    return sw.focused_widget_id;
}