summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-07-25 17:40:44 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:46 +0200
commit2e6847a352e0b0d856d247ddc78d752b47ddddd4 (patch)
tree47ced9320ff49e511d5f9d1e2079fb817767065f /libvo
parent902417b9999cda96ee47e07c6e4e299d78356469 (diff)
downloadmpv-2e6847a352e0b0d856d247ddc78d752b47ddddd4.tar.bz2
mpv-2e6847a352e0b0d856d247ddc78d752b47ddddd4.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_corevideo.m44
1 files changed, 21 insertions, 23 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m
index 3d489299c1..a135d03723 100644
--- a/libvo/vo_corevideo.m
+++ b/libvo/vo_corevideo.m
@@ -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;