chainFocused
Parameters
- self:*FloatingMenuWidget
- *FloatingMenuWidget
- self_call:bool
- bool
Source
Implementation
pub fn chainFocused(self: *FloatingMenuWidget, self_call: bool) bool {
if (!self_call) {
// if we got called by someone else, then we have a popup child
self.have_popup_child = true;
}
var ret: bool = false;
// we have to call chainFocused on our parent if we have one so we
// can't return early
if (self.data().id == dvui.focusedSubwindowId()) {
// we are focused
ret = true;
}
if (self.parent_fmw) |pp| {
// we had a parent popup, is that focused
if (pp.chainFocused(false)) {
ret = true;
}
} else if (self.prev_windowInfo.id == dvui.focusedSubwindowId()) {
// no parent popup, is our parent window focused
ret = true;
}
return ret;
}