[MPlayer-cvslog] r31825 - trunk/libvo/vo_corevideo.m

reimar subversion at mplayerhq.hu
Sun Jul 25 19:40:44 CEST 2010


Author: reimar
Date: Sun Jul 25 19:40:44 2010
New Revision: 31825

Log:
Move mouse hiding code to check_events, this allows mouse hiding
to continue to work with -idle -fixed-vo, after the video has
finished but the last frame is still displayed.

Modified:
   trunk/libvo/vo_corevideo.m

Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m	Sun Jul 25 19:06:41 2010	(r31824)
+++ trunk/libvo/vo_corevideo.m	Sun Jul 25 19:40:44 2010	(r31825)
@@ -717,8 +717,6 @@ static int control(uint32_t request, voi
 */
 - (void) render
 {
-	int curTime;
-
 	glClear(GL_COLOR_BUFFER_BIT);
 
 	glEnable(CVOpenGLTextureGetTarget(texture));
@@ -757,27 +755,6 @@ static int control(uint32_t request, voi
 	}
 
 	glFlush();
-
-	curTime  = TickCount()/60;
-
-	//automatically hide mouse cursor (and future on-screen control?)
-	if(isFullscreen && !mouseHide && !isRootwin)
-	{
-		if(curTime - lastMouseHide >= 5 || lastMouseHide == 0)
-		{
-			CGDisplayHideCursor(kCGDirectMainDisplay);
-			mouseHide = TRUE;
-			lastMouseHide = curTime;
-		}
-	}
-
-	//update activity every 30 seconds to prevent
-	//screensaver from starting up.
-	if(curTime - lastScreensaverUpdate >= 30 || lastScreensaverUpdate == 0)
-	{
-		UpdateSystemActivity(UsrActivity);
-		lastScreensaverUpdate = curTime;
-	}
 }
 
 /*
@@ -901,6 +878,27 @@ static int control(uint32_t request, voi
 */
 - (void) check_events
 {
+	int curTime = TickCount()/60;
+
+	//automatically hide mouse cursor (and future on-screen control?)
+	if(isFullscreen && !mouseHide && !isRootwin)
+	{
+		if(curTime - lastMouseHide >= 5 || lastMouseHide == 0)
+		{
+			CGDisplayHideCursor(kCGDirectMainDisplay);
+			mouseHide = TRUE;
+			lastMouseHide = curTime;
+		}
+	}
+
+	//update activity every 30 seconds to prevent
+	//screensaver from starting up.
+	if(curTime - lastScreensaverUpdate >= 30 || lastScreensaverUpdate == 0)
+	{
+		UpdateSystemActivity(UsrActivity);
+		lastScreensaverUpdate = curTime;
+	}
+
 	event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSEventTrackingRunLoopMode dequeue:YES];
 	if (event == nil)
 		return;


More information about the MPlayer-cvslog mailing list