[MPlayer-cvslog] CVS: main/libvo video_out.h, 1.64, 1.65 x11_common.c, 1.209, 1.210 x11_common.h, 1.47, 1.48

Uoti Urpala CVS syncmail at mplayerhq.hu
Tue Apr 25 23:36:05 CEST 2006


CVS change done by Uoti Urpala CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv27348/libvo

Modified Files:
	video_out.h x11_common.c x11_common.h 
Log Message:
Remove updating of vo_mouse_timer_const from the main loop and also
remove the variable itself. Convert code in x11_common.c and OSD timing
that depended on the variable to use real time instead.


Index: video_out.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- video_out.h	16 Apr 2006 13:38:28 -0000	1.64
+++ video_out.h	25 Apr 2006 21:36:02 -0000	1.65
@@ -217,7 +217,6 @@
 extern int vo_gamma_green_intensity;
 extern int vo_gamma_blue_intensity;
 
-extern int vo_mouse_timer_const;
 extern int vo_nomouse_input;
 
 extern int vo_pts;

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -r1.209 -r1.210
--- x11_common.c	24 Apr 2006 07:20:34 -0000	1.209
+++ x11_common.c	25 Apr 2006 21:36:02 -0000	1.210
@@ -1001,8 +1001,8 @@
     }
 }
 
-int vo_mouse_timer_const = 30;
-static int vo_mouse_counter = 30;
+static unsigned int mouse_timer;
+static int mouse_waiting_hide;
 
 int vo_x11_check_events(Display * mydisplay)
 {
@@ -1014,8 +1014,11 @@
 
 // unsigned long  vo_KeyTable[512];
 
-    if ((vo_mouse_autohide) && (--vo_mouse_counter == 0))
+    if ((vo_mouse_autohide) && mouse_waiting_hide &&
+                                 (GetTimerMS() - mouse_timer >= 1000)) {
         vo_hidecursor(mydisplay, vo_window);
+        mouse_waiting_hide = 0;
+    }
 
     while (XPending(mydisplay))
     {
@@ -1084,14 +1087,16 @@
                 if (vo_mouse_autohide)
                 {
                     vo_showcursor(mydisplay, vo_window);
-                    vo_mouse_counter = vo_mouse_timer_const;
+                    mouse_waiting_hide = 1;
+                    mouse_timer = GetTimerMS();
                 }
                 break;
             case ButtonPress:
                 if (vo_mouse_autohide)
                 {
                     vo_showcursor(mydisplay, vo_window);
-                    vo_mouse_counter = vo_mouse_timer_const;
+                    mouse_waiting_hide = 1;
+                    mouse_timer = GetTimerMS();
                 }
                 // Ignore mouse whell press event
                 if (Event.xbutton.button > 3)
@@ -1112,7 +1117,8 @@
                 if (vo_mouse_autohide)
                 {
                     vo_showcursor(mydisplay, vo_window);
-                    vo_mouse_counter = vo_mouse_timer_const;
+                    mouse_waiting_hide = 1;
+                    mouse_timer = GetTimerMS();
                 }
 #ifdef HAVE_NEW_GUI
                 // Ignor mouse button 1 - 3 under gui 

Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- x11_common.h	21 Apr 2006 18:42:55 -0000	1.47
+++ x11_common.h	25 Apr 2006 21:36:02 -0000	1.48
@@ -33,7 +33,6 @@
 extern int mScreen;
 extern int mLocalDisplay;
 
-extern int vo_mouse_timer_const;
 extern int vo_mouse_autohide;
 
 extern int vo_init( void );




More information about the MPlayer-cvslog mailing list