OS X Front Application


#1

Is there a way to tell in your application is the front most application in OS X or a call that is made when it is not.

suspend and resume do not work on OSX juce.

handleBroughtToFront is called but there is no equivlent like ​handleSendToBack


#2

Process::isForegroundProcess()

You might just want to check its value every couple of seconds to see when it changes


#3

Thanks that is what I needed.


#4

It would be great though if the lack of application suspended / resumed implementation on OS X could be addressed. You can register for notifications via:
[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: selector: name: object:]
using NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification for the name argument.


#5

Why doesn’t suspend / resumed work on OSX?

(Cannot find it in mac_Windowing.mm, maybe I’m looking in the wrong file?)