开发者

How to find out whether an NSWindow is active

How can I find out if an NSWindow is active? i.e. if I have some windows on the desktop then only one is active and has colored window but开发者_如何学Pythontons and receives keyboard and mouse events. How can I find out if my window is the active one? To find out if the window is miniaturized there is the isMiniaturized method.


You are looking for NSWindow's -isKeyWindow method. "is key" means that it receives keyboard events.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜