Is it possible to determine the previous active process to activate it?
Mac OS X / C++ / Carbon.
GetNextProcess()
does not refer to Z-order of processes, but I need the real previous.
The original task is to bring the user back to their work when they closes my info window. Currently another window of my app gets the focus, if any, or there just no window with focus. It is unusable.
Update. Now I'm using the following workaround: 500ms timer watches for GetFrontProcess()
which is not equal GetCurrentProcess()
. Then calling SetForegroundProcess()
for the last stored serial nu开发者_运维知识库mber.
You can get the zorder of processes from this place. Last process should be the one you are looking for. Or change code to read in reverse.
精彩评论