Home Forums Software Development receive OnGaze when hidden behind another window Reply To: receive OnGaze when hidden behind another window

#2778
Patrik [Tobii]
Participant

Hello Quoc,

Alas, the way EyeX engine work you will not get any OnGaze events if the interactor cannot be seen.
This works similar to other events in WindowsForms (i.e. you won’t recieve an MouseOver event in WinForms if there’s another window obstructing the view of the control).

If you want to know when the user is looking at your control even if it’s obstructed, you could always calculate this yourself by doing hit testing using the gaze points from the gaze data stream.

To remove a control from a behavior map at runtime, you can add the following method to BehaviorMap.cs:


public bool RemoveInteractor(Control control)
{
    var interactor = GetInteractor(control);
    if (interactor != null)
    {
        return _interactors.Remove(interactor);
    }
    return false;
}

Best regards
Patrik Svensson