exist something like isFocused()

Hi,
I need to check if OF window is focused. Is it possible? Does anybody know any solution?

Thank a lot!

rasco