[MPlayer-dev-eng] [PATCH] Fix MPlayer OSX mouse hidding bug

Ulion ulion2002 at gmail.com
Sun Aug 26 04:25:47 CEST 2007


Hello,

I found mplayer osx has bug of hide mouse in fullscreen mode, it will
never hide mouse if you showed mouse in fullscreen mode and switch to
normal window and wait 5 seconds, after these steps, the mouse will
never hide in fullscreen mode again. And also, the old code did not
update the hidding timer when mouse moved again after first move.

here's the fix  to make the mouse hidding function work properly as we expected.

-- 
Ulion
-------------- next part --------------
Index: Sources/Classes/PlayerWindow.m
===================================================================
--- Sources/Classes/PlayerWindow.m	(revision 136)
+++ Sources/Classes/PlayerWindow.m	(working copy)
@@ -76,8 +76,8 @@
 	{
 		NSLog(@"hide mouse");
 		CGDisplayHideCursor(kCGDirectMainDisplay);
-		osdTimer = nil;
 	}
+	osdTimer = nil;
 }
 
 - (void)mouseMoved:(NSEvent *)theEvent
@@ -92,11 +92,17 @@
 								selector:@selector(hideOSD:)
 								userInfo:nil repeats:NO];
 		}
+		else
+		{
+			[osdTimer setFireDate: [NSDate dateWithTimeIntervalSinceNow: 5]];
+		}
 	}
 }
 


More information about the MPlayer-dev-eng mailing list