# HG changeset patch # User reimar # Date 1280079644 0 # Node ID a320b893f660319165aeaaea185e3ebb7dc37fe7 # Parent 0577595394f8643656f53f2cb37f599af3150cda 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. diff -r 0577595394f8 -r a320b893f660 libvo/vo_corevideo.m --- a/libvo/vo_corevideo.m Sun Jul 25 17:06:41 2010 +0000 +++ b/libvo/vo_corevideo.m Sun Jul 25 17:40:44 2010 +0000 @@ -717,8 +717,6 @@ */ - (void) render { - int curTime; - glClear(GL_COLOR_BUFFER_BIT); glEnable(CVOpenGLTextureGetTarget(texture)); @@ -757,27 +755,6 @@ } 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 @@ */ - (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;