Search code examples
wpfleap-motion

Leap doesn't seem to update when wpf window isn't active


I am trying to use output from the leap in WPF. However whenever I unfocus the window (for instance by pressing alt+tab), the leap stops giving output. So my question is, how to make sure the leap will output even when focused on a second application?


Solution

  • You just need to set the Leap Motion API background frames policy.

    controller.SetPolicy(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES);