[Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.36,1.37 vo_xv.c,1.39,1.40 x11_common.c,1.40,1.41 x11_common.h,1.12,1.13

Atmosfear atmos4 at mplayer.dev.hu
Sat Jan 5 09:49:55 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv4605

Modified Files:
	vo_xmga.c vo_xv.c x11_common.c x11_common.h 
Log Message:
xinerama fix by attila

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- vo_xmga.c	28 Dec 2001 20:15:43 -0000	1.36
+++ vo_xmga.c	5 Jan 2002 08:49:46 -0000	1.37
@@ -305,6 +305,9 @@
    XSetNormalHints( mDisplay,mWindow,&hint );
    XStoreName( mDisplay,mWindow,mTitle );
    XMapWindow( mDisplay,mWindow );
+#ifdef HAVE_XINERAMA
+   vo_x11_xinerama_move(mDisplay,mWindow);
+#endif
    mGC=XCreateGC( mDisplay,mWindow,GCForeground,&wGCV );
 #ifdef HAVE_NEW_GUI
   }

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- vo_xv.c	28 Dec 2001 13:24:27 -0000	1.39
+++ vo_xv.c	5 Jan 2002 08:49:46 -0000	1.40
@@ -205,6 +205,9 @@
    XSetStandardProperties(mDisplay, mywindow, hello, hello, None, NULL, 0, &hint);
    if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
    XMapWindow(mDisplay, mywindow);
+#ifdef HAVE_XINERAMA
+   vo_x11_xinerama_move(mDisplay,mywindow);
+#endif
    mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv);
    XFlush(mDisplay);
    XSync(mDisplay, False);

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- x11_common.c	2 Jan 2002 19:14:05 -0000	1.40
+++ x11_common.c	5 Jan 2002 08:49:46 -0000	1.41
@@ -148,15 +148,15 @@
   {
   XineramaScreenInfo *screens;
   int num_screens;
-  int disp_screen = mScreen;
+
+  mScreen = 0;
 
   screens = XineramaQueryScreens(mDisplay, &num_screens);
-  if (disp_screen > num_screens)
-    disp_screen = 0;
   if (! vo_screenwidth)
-    vo_screenwidth=screens[disp_screen].width;
+    vo_screenwidth=screens[mScreen].width;
   if (! vo_screenheight)
-    vo_screenheight=screens[disp_screen].height;
+    vo_screenheight=screens[mScreen].height;
+  XFree(screens);
   }
  else
 #endif
@@ -476,5 +476,23 @@
 	XSetScreenSaver(mDisplay, 0, interval, prefer_blank, allow_exp);
 		    // turning off screensaver
 }
+
+
+
+#ifdef HAVE_XINERAMA
+void vo_x11_xinerama_move(Display *dsp, Window w)
+{
+	XineramaScreenInfo *screens;
+	int num_screens;
+
+	if(XineramaIsActive(dsp))
+	{
+		screens = XineramaQueryScreens(dsp,&num_screens);
+		/* printf("XXXX Xinerama screen: x: %hd y: %hd\n",screens[mScreen].x_org,screens[mScreen].y_org); */
+		XMoveWindow(dsp,w,screens[mScreen].x_org,screens[mScreen].y_org);
+		XFree(screens);
+	}
+}
+#endif
 
 #endif

Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- x11_common.h	28 Dec 2001 13:24:27 -0000	1.12
+++ x11_common.h	5 Jan 2002 08:49:46 -0000	1.13
@@ -37,3 +37,7 @@
 
 void saver_off( Display * );
 void saver_on( Display * );
+
+#ifdef HAVE_XINERAMA
+void vo_x11_xinerama_move(Display *dsp, Window w);
+#endif




More information about the MPlayer-cvslog mailing list