Showing a modal NSWindow, without activating the other application windows

后端 未结 4 1036
误落风尘
误落风尘 2020-12-15 12:53

I have an NSStatusItem that is properly displaying in the MenuBar. One of the items (when clicked) displays a modal NSWindow from my application, which is meant

4条回答
  •  有刺的猬
    2020-12-15 13:26

    Instead of creating an NSWindow, create an NSPanel with the style NSNonactivatingPanelMask. You can then do the usual makeKeyAndOrderFront: and orderOut: to show/hide panel as needed.

提交回复
热议问题