Separate names with a comma.
Discussion in 'Mac Apps and Mac App Store' started by gekko513, Apr 20, 2004.
In a Cocoa / Objective C app, how do I detect if Exposé has been activated?
It is not currently possible from any kind of application to detect if Exposé has been activated. It has been proposed (and I believe a feature request filed) for an asynchronous notification, but that won't arrive until at least 10.4 (depends on when the request is dealt with).
What are you trying to do?
I'm curious... why would you want to detect if Exposé was activated?
There's a bug in the window system that causes the coordinate system for a window to become corrupted if the window is programatically moved while exposé is activated.
I'm currently developing my first OSX app. It's a widget that makes a picture move in and out of the screen, sort of like a peekaboo. When exposé is activated, the window just keeps moving ... which is kinda cool, but unfortunately causes a [self setFrameOrigin:NSMakePoint(0, 0)] to not move the window to the bottom left corner after Exposé is deactivated.
I thought I could fix it by detecting exposé and just not move the window while it was activated. Now I'm not really sure what I can do to work around this.
I wasn't aware of that bug, but maybe I can offer a few alternative designs.
Maybe you can use an overlay window and just draw your image in the right position within that window rather than moving the window?
If you use a non-exposéd window (like a floating/utility type window) then it should be hidden during Exposé, and maybe that will avoid the issue?
Moving the content instead of the window is a good idea, I have to sacrifice the possibility of peekabooing from all edges of the screen though (or use a giant window ). The app initially used a always-on-top-window that disappeared on show-windows-exposé, it didn't however disappear on show-desktop-exposé, so that doesn't work, unfortunately.