[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.163,1.164

Diego Biurrun CVS syncmail at mplayerhq.hu
Fri Mar 12 03:19:11 CET 2004


CVS change done by Diego Biurrun CVS

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

Modified Files:
	x11_common.c 
Log Message:
Use system clock for xscreensaver pings.

Originally committed by ranma, recommitted by me since several revisions
before this one had been reversed, creating a "hole" in the CVS revision
history.


Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- x11_common.c	24 Feb 2004 18:17:05 -0000	1.163
+++ x11_common.c	12 Mar 2004 02:19:08 -0000	1.164
@@ -17,7 +17,9 @@
 
 #include "video_out.h"
 #include "aspect.h"
+#include "geometry.h"
 #include "help_mp.h"
+#include "../osdep/timer.h"
 
 #include <X11/Xmd.h>
 #include <X11/Xlib.h>
@@ -809,10 +811,13 @@
  if(vo_x11_keepaspect)
  {
  	vo_hint.flags |= PAspect;
-	vo_hint.min_aspect.x = width;
-	vo_hint.min_aspect.y = height;
-	vo_hint.max_aspect.x = width;
-	vo_hint.max_aspect.y = height;
+
+	aspect(&vo_hint.min_aspect.x, &vo_hint.min_aspect.y, vo_fs);
+	vo_hint.max_aspect.x = vo_hint.min_aspect.x;
+	vo_hint.max_aspect.y = vo_hint.min_aspect.y;
+
+	mp_msg(MSGT_VO, MSGL_V, "[x11] window aspect set to x: %d, y: %d\n",
+	vo_hint.min_aspect.x, vo_hint.min_aspect.y);
   }
 
  vo_hint.x=x; vo_hint.y=y; vo_hint.width=width; vo_hint.height=height;
@@ -1142,14 +1147,15 @@
 static Atom deactivate;
 static Atom screensaver;
 
-static float time_last;
+static unsigned int time_last;
 
-void xscreensaver_heartbeat(float time)
+void xscreensaver_heartbeat(void)
 {
+    unsigned int time = GetTimerMS();
     XEvent ev;
 
     if (mDisplay && xs_windowid &&
-	((time - time_last)>30 ||
+	((time - time_last)>30000 ||
 	 (time - time_last)<0)) {
 	time_last = time;
 
@@ -1311,7 +1317,7 @@
 #ifdef HAVE_XINERAMA
 void vo_x11_xinerama_move(Display *dsp, Window w)
 {
-	if(XineramaIsActive(dsp))
+	if(XineramaIsActive(dsp) && ! geometry_xy_changed)
 	{
 		 /* printf("XXXX Xinerama screen: x: %hd y: %hd\n",xinerama_x,xinerama_y); */
 		XMoveWindow(dsp,w,xinerama_x,xinerama_y);




More information about the MPlayer-cvslog mailing list