开发者

How do I detect when a safari webplugin loses focus?

I need to be able to detect the browser loses focus in a webkit plugin I wrote. I thought I could implement the webViewUnfocus method from the WebUIDelegate protocol but that's not firing. Does anyone have a pointer to a code snippet for what should be a relatively simple proble开发者_开发技巧m?


The solution to this problem was to setup an observer that watched for NSApplicationDidBecomeActiveNotification and NSApplicationDidResignActiveNotification notifications. This let me cleanup and reinitialize when the app lost and regained focus.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜