如何查找当前专注于macos的程序?

时间:2017-04-24 16:58:23

标签: c++ macos macos-sierra objective-c++

是否有API函数调用返回标识符以找出当前焦点的程序。

我正在寻找这个问题的答案,但是关于MacOS How do I find the program with the current focus?

1 个答案:

答案 0 :(得分:2)

Either frontmostApplication or menuBarOwningApplication, depending on what exactly you mean by "focus".