Thanks Matthias! I've find the solution, the problem was that my fullscreen window was a top window [fullscreenWindow setLevel: NSScreenSaverWindowLevel-1]; so it captured all events every time. I've used this methods to catch the moment when my application loses/gets focus, and the I hide/unhide my app with all the windows:
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
{
[mApp unhide:self];
}
- (void)applicationWillResignActive:(NSNotification *)aNotification
{
[mApp hide:self];
}
- (void)applicationWillFinishLaunching:(NSNotification *)aNotification
{
mApp=[aNotification object];
}