Possible focus loss issue


#1

i’m trying to get the focus “cause” when i tab components on focusLost, and it always gives me focusChangedDirectly. i looked into Component::internalFocusLoss, and i saw that rather than forwarding the cause parameter, it explicitly passes in focusChangedDirectly (in contrast, Component::internalFocusGained forwards the cause parameter)

void Component::internalFocusLoss (const FocusChangeType cause)
{
    const WeakReference<Component> safePointer (this);

    focusLost (focusChangedDirectly);

    if (safePointer != nullptr)
        internalChildFocusChange (cause, safePointer);
}

is this correct? am i going about this incorrectly?


#2

Hmm, thanks, yes, it does look like it should be forwarding the cause to that method call. Will correct that!