+- (void)makeKeyAndOrderFront: (id)sender
+{
+ /* Hack
+ * when we exit fullscreen and fade out, we may endup in
+ * having a window that is faded. We can't have it fade in unless we
+ * animate again. */
+
+ [super setAlphaValue:0.0f];
+ [super makeKeyAndOrderFront: sender];
+
+ NSMutableDictionary * dict = [[[NSMutableDictionary alloc] initWithCapacity:2] autorelease];
+ [dict setObject:self forKey:NSViewAnimationTargetKey];
+ [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
+
+ NSViewAnimation * anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict]];
+
+ [anim setAnimationBlockingMode: NSAnimationNonblocking];
+ [anim setDuration: 0.1];
+ [anim setFrameRate: 30];
+
+ [anim startAnimation];
+ /* fullscreenAnimation will be unlocked when animation ends */
+}
+
+
+