views:

223

answers:

2

Is it possible to disable Expose programmatically?

+1  A: 

Read this article for some tips how to programmatically disable some osx features. It's a workaround (since it just removes the hotkeys), but it should fit your needs.

Marcel J.
My app run in fullscreen mode and I should disable temporary (while app is running) Expose.I use SetSystemUIMode for hide Dock and Menu bars. And I need some identical possibility to disable Expose.
e40pud
+1 was going to suggest exactly this. Pro Tools is incredibly lazy and just tells you to disable certain hot keys yourself!
Daniel Earwicker
This is the approach the Blizzard takes in its games AFAIK, but be warned — it was really annoyingly messed up for a long time in World of Warcraft. At the time, I would much rather have had it not be so helpful.
Chuck
+2  A: 

I believe you can find a possible answer at CocoaDev - DontExposeMe. Be very careful of using undocumented methods as such things can and do go away or change which may lead to unexpected behavior in your application.

Way back in 2004, someone asked this on Apple's Carbon Development mailing list and Eric Schlegel (works for Apple) responded. Basically, the news then wasn't good and suggested that this only be done for kiosk machines where you can set the system preferences up appropriately. He also mentioned this was a known bug - rdar://3499719.

Sadly, this does seem like something that you probably shouldn't try to do right now. I certainly wouldn't appreciate it if some application started messing with my system preferences as mentioned in the article Marcel pointed to and then proceeded to screw them up because it crashed or something.

So, I would suggest heading over to bugreport.apple.com and filing your own bug. It does make a difference because Apple does use the frequency of similar bug reports to help judge whether or not they should do or fix something. Make sure to include the url for the reply by Eric S. and the bug number he mentioned.

ericgorr
Thank you!I solve one of my issues by making impossible for users access active screen corners when my app run in fullscreen mode.
e40pud