vo_corevideo: move mouse hiding to check_events

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.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31825 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-07-25 17:40:44 +00:00 committed by Uoti Urpala
parent 902417b999
commit 2e6847a352
1 changed files with 21 additions and 23 deletions

View File

@ -717,8 +717,6 @@ static int control(uint32_t request, void *data)
*/
- (void) render
{
int curTime;
glClear(GL_COLOR_BUFFER_BIT);
glEnable(CVOpenGLTextureGetTarget(texture));
@ -757,27 +755,6 @@ static int control(uint32_t request, void *data)
}
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, void *data)
*/
- (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;