Return NSWindow to Normal Level
- by PF1
Hi Everyone:
I have an NSWindow that I want to go above the captured kCGDirectMainDisplay when a function is run and have the window go back to its normal level after the display is released. My code works for capturing the display, setting the window's level, and releasing the display, however once the display is released, the window floats above all other windows. I have included my method of doing this, in case I am doing something wrong.
Capture the display
CGDisplayCapture(kCGDirectMainDisplay);
[self.window setLevel:CGShieldingWindowLevel()];
Release the display
CGDisplayRelease(kCGDirectMainDisplay)
[self.window setLevel:NSNormalWindowLevel];
Thanks for any help!