Show NSWindow when Mission Control/Exposé "Show Desktop" is active

491 Views Asked by At

I am building a Cocoa application that allows you to drag and drop files from a NSTableView to your computer. Personally, and I know I'm not alone, when I use applications like this I grab the files, invoke the "Show Desktop" hotkey which makes all my windows go away and then I drop the files on my Desktop.

However, if the files already exist on my Desktop, or wherever I'm dropping them, an Alert sheet comes up asking if I want to overwrite the files. But since I'm in Mission Control/Exposé "Show Desktop" mode, the sheet is floating in the middle of my Desktop instead of attached to my NSWindow...

Ideally, if my application has to show an alert sheet, while all the windows are offscreen, I would like to bring my window forward and out of this mode so the sheet is attached to it and not floating in the middle of my desktop but I cannot find much information on the subject. I've tried the standard makeKey and orderFront tactics but no dice. I've also looked into NSWindows setCollectionBehavior but none of these options seem applicable unless i just want my window to just always stay out and ignore this mode.

Does anyone know how to bring a NSWindow out of Exposé when in "Show Desktop" mode?

0

There are 0 best solutions below