]> git.sesse.net Git - vlc/commitdiff
macosx: correctly hide the cursor when using Lion's native fullscreen mode. Fixes...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 15 Oct 2011 15:16:55 +0000 (17:16 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 15 Oct 2011 15:16:55 +0000 (17:16 +0200)
modules/gui/macosx/CompatibilityFixes.h
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.m

index b27566c64490dc98e332093eeb1c6fdba5d93b20..8fd8b6afa0c20c3243e9f3f8778090ac29e6a943 100644 (file)
@@ -77,6 +77,8 @@ enum {
 @interface NSWindow (IntroducedInLion)
 - (void)setRestorable:(BOOL)b_value;
 - (void)toggleFullScreen:(id)id_value;
+- (void)windowWillEnterFullScreen:(NSNotification *)notification;
+- (void)windowWillExitFullScreen:(NSNotification *)notification;
 @end
 
 @interface NSEvent (IntroducedInLion)
index 396f2425b3178dfa409b969923ae0f01faeac52c..a1668e332f68685a9dcdaeaaf88f9a3c26b2c3ac 100644 (file)
 - (void)hasBecomeFullscreen;
 - (void)setFrameOnMainThread:(NSData*)packedargs;
 
+/* lion's native fullscreen handling */
+- (void)windowWillEnterFullScreen:(NSNotification *)notification;
+- (void)windowWillExitFullScreen:(NSNotification *)notification;
+
 @end
 
 @interface VLCProgressBarGradientEffect : NSView {
index fa308f20d9578b1569186475802d87d883f872d4..b96c8a2a981bae9cf22ff87fd5176d817a9a8509 100644 (file)
@@ -1409,6 +1409,18 @@ static VLCMainWindow *_o_sharedInstance = nil;
     }
 }
 
+#pragma mark -
+#pragma mark Lion's native fullscreen handling
+- (void)windowWillEnterFullScreen:(NSNotification *)notification
+{
+    [NSCursor setHiddenUntilMouseMoves: YES];
+}
+
+- (void)windowWillExitFullScreen:(NSNotification *)notification
+{
+    [NSCursor setHiddenUntilMouseMoves: NO];
+}
+
 #pragma mark -
 #pragma mark Side Bar Data handling
 /* taken under BSD-new from the PXSourceList sample project, adapted for VLC */