0

I am working on an wpf project with leap motion. My programm is allways checking for input via the leap motion controller and does something with it.

But when I open another programm (and my wpf gets in the background) my wpf freezes.

Is there a way my programm will not freeze even if I open another programm in fullscreen ?

EDIT: here is how i get my input:

 public MainWindow()
 {
        InitializeComponent();

        CompositionTarget.Rendering += Update;
 }

 protected void Update(object sender, EventArgs e)
 {
        //get frame
        Leap.Frame frame = leap.Frame();

        ...
 }
IIIIIIIIIIIIIIIIIIIIII
  • 3,958
  • 5
  • 45
  • 70

1 Answers1

0

Thank you Charles Ward this did it for me:

controller.SetPolicy(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES);

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

Community
  • 1
  • 1
IIIIIIIIIIIIIIIIIIIIII
  • 3,958
  • 5
  • 45
  • 70