[vlc-devel] commit: macosx: Fix #1802 Cursor not hidden if fullscreen controller is disabled (OS X). ( Pierre d'Herbemont )
git version control
git at videolan.org
Fri Aug 1 21:47:59 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Aug 1 21:33:36 2008 +0200| [e3da66b70651638d43fedec18db02e526b7a11e9] | committer: Pierre d'Herbemont
macosx: Fix #1802 Cursor not hidden if fullscreen controller is disabled (OS X).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3da66b70651638d43fedec18db02e526b7a11e9
---
modules/gui/macosx/fspanel.m | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/fspanel.m b/modules/gui/macosx/fspanel.m
index ae252ba..d3ceab1 100644
--- a/modules/gui/macosx/fspanel.m
+++ b/modules/gui/macosx/fspanel.m
@@ -31,6 +31,10 @@
#import "misc.h"
#import "fspanel.h"
+ at interface VLCFSPanel ()
+- (void)hideMouse;
+ at end
+
/*****************************************************************************
* VLCFSPanel
*****************************************************************************/
@@ -244,10 +248,23 @@
[[[[[VLCMain sharedInstance] getControls] getVoutView] window] makeKeyWindow];
}
+- (void)hideMouse
+{
+ [NSCursor setHiddenUntilMouseMoves: YES];
+}
+
- (void)fadeIn
{
- /* in case that the user don't want us to appear, just return here */
- if(! config_GetInt( VLCIntf, "macosx-fspanel" ) || b_nonActive )
+ /* in case that the user don't want us to appear, make sure we hide the mouse */
+
+ if( !config_GetInt( VLCIntf, "macosx-fspanel" ) )
+ {
+ float time = (float)var_CreateGetInteger( VLCIntf, "mouse-hide-timeout" ) / 1000.;
+ [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:time target:self selector:@selector(hideMouse) userInfo:nil repeats:NO]];
+ return;
+ }
+
+ if( b_nonActive )
return;
[self orderFront: nil];
@@ -310,7 +327,7 @@
/* count down until we hide ourselfes again and do so if necessary */
if( --i_timeToKeepVisibleInSec < 1 )
{
- [NSCursor setHiddenUntilMouseMoves: YES];
+ [self hideMouse];
[self fadeOut];
[hideAgainTimer invalidate]; /* released in -autoHide and -dealloc */
b_alreadyCounting = NO;
More information about the vlc-devel
mailing list