Mac OS X Lion: Detect if another application is running in full screen mode?

后端 未结 4 1955
暗喜
暗喜 2021-01-01 16:09

In a Cocoa app, is there a way to tell if another application currently is in full screen mode?

My application is configured to show up on all Spaces and listens for

4条回答
  •  孤街浪徒
    2021-01-01 16:48

    After a great deal of frustration, this worked for me to get a window that floats on all spaces except full-screen ones. I saw the fullScreenNone constant name, and since it described what I wanted, I tried it and found that it worked.

        window.level = .floating
        window.collectionBehavior = [.canJoinAllSpaces, .fullScreenNone]
        window.canHide = false
    

提交回复
热议问题