Getting the main window of an app via an NSRunningApplication instance

后端 未结 3 1509
醉梦人生
醉梦人生 2020-12-11 05:54

I\'m observing NSWorkspaceDidDeactivateApplicationNotification notification to get the application that has just lost focus. I\'m ending up with an instance of NSRunningAppl

3条回答
  •  失恋的感觉
    2020-12-11 06:16

    Unless the application opts to participate in IAC via AppleScript support or some other means, you simply don't touch its windows or anything else outside of your own heap space.

提交回复
热议问题