Mercurial > mplayer.hg
changeset 31759:a320b893f660
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.
author | reimar |
---|---|
date | Sun, 25 Jul 2010 17:40:44 +0000 |
parents | 0577595394f8 |
children | dc95a7191375 |
files | libvo/vo_corevideo.m |
diffstat | 1 files changed, 21 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- 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;