Activate previous process on Mac

Is it possible to determine the previous active process to activate it?

Mac OS X / C ++ / Carbon.


GetNextProcess() not relevant to the Z-order of processes, but I need a real previous one.

The initial task is to return the user to work when he closes my information window. Currently, another window of my application is receiving focus, if there is one, or there is simply no window with focus. It is unsuitable.


Update. Now I am using the following workaround: 500 ms timer for GetFrontProcess(), which is not equal GetCurrentProcess(). It is then called SetForegroundProcess()for the last saved serial number.

0
source share
1 answer

zorder . , . .

+1

All Articles