[solved] GUI App stops running when losing focus

Hello everyone,

I’m experiencing something pretty annoying when using my GUI app alongside other programs.
When I click on another window than the actual app, its stops running. I thought this had something to do with the setWantsKeyboardFocus() method but it doesn’t.
To put the question in context : I’m making a “bridge” app between a Leap motion and a plugin using osc messages. I’m displaying the coordinates of my hand on the GUI of the app but as my plugin window comes in front of it, those coordinates freese and stop refreshing (the whole app stops running in fact, not only the GUI).

Does anyone has a clue ?

PS: it used to be the same thing when running a console app, I thought the problem wouldn’t happend with a GUI app but it does.

Thanks

You need to debug your app and see where your app is stuck. Presumably the message loop is blocked.

Ok my bad, it had nothing to do with Juce. I just had to set the BACKGROUND_POLICY_FLAG for the LeapMotion controller.

Thank you though

You can edit the title and prepend [solved] for instance… that won’t stop some people from adding stuff, but a reasonable person would leave it and people can start ignoring it