Peter N Lewis
Peter N Lewis

Reputation: 17811

How can I make a floating panel that disappears in full screen mode

I have a panel that I want to float above all windows and appear in all spaces. This is easily done with

[self.panel setLevel:kCGUtilityWindowLevel];
[self.window setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];

but now I want to be able to optionally hide the panel in full screen mode. I still want it to appear in all spaces when not in full screen mode.

I can't seem to find any set of options that will result in a floating panel, visible in all screens, but hidden in full screen mode.

It's possible I could detect when the system goes in to full screen mode and adjust the panel settings, but I was hoping for a more elegant behaviour setting.

Upvotes: 2

Views: 541

Answers (1)

Peter N Lewis
Peter N Lewis

Reputation: 17811

According to DTS there is no supported way to achieve the desired functionality.

I would still desperately like some sort of (legitimate) hack solution to this. I don't like hacks in general, but sometimes they are necessary, as long as they can be made fail-safe.

Upvotes: 0

Related Questions