Reputation: 567
I was wondering if it is possible to make my NSWindow show above absolutely everything. I current set the window level to CGShieldingWindowLevel using the code...
[self setLevel:CGShieldingWindowLevel()];
...and this does a great job for the most part, but it isn't quite enough. The window is not drawn when mission control or expose is active, and it is drawn below the mouse. I was wondering if it was possible to crearte a truly "top level" which would be drawn above all these elements.
Any help would be greatly appreciated. Thanks!
Upvotes: 9
Views: 1489
Reputation: 29524
In regards to your question about Expose, you probably just haven't set your collection behavior correctly. Make a subclass of NSWindow
, and somewhere in your initialization do something along the following:
self.collectionBehavior = (NSWindowCollectionBehaviorStationary | NSWindowCollectionBehaviorIgnoresCycle);
If you want your window on all spaces (which you probably do) don't forget to also add NSWindowCollectionBehaviorCanJoinAllSpaces
.
In terms of your question about the mouse, unfortunately I do not think there's a way to draw above it.
Upvotes: 7