changeset 15589:c3108031b78a

Implement -geometry for vo gl and gl2.
author reimar
date Sun, 29 May 2005 17:04:51 +0000
parents f059e49b9f10
children e848b20cd449
files DOCS/man/en/mplayer.1 libvo/vo_gl.c libvo/vo_gl2.c
diffstat 3 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sun May 29 14:10:01 2005 +0000
+++ b/DOCS/man/en/mplayer.1	Sun May 29 17:04:51 2005 +0000
@@ -2154,7 +2154,7 @@
 .br
 .I NOTE:
 This option is only supported by the x11, xmga, xv, xvmc, xvidix,
-directx and tdfxfb video output drivers.
+gl, gl2 (except under Windows), directx and tdfxfb video output drivers.
 .sp 1
 .I EXAMPLE:
 .PD 0
--- a/libvo/vo_gl.c	Sun May 29 14:10:01 2005 +0000
+++ b/libvo/vo_gl.c	Sun May 29 17:04:51 2005 +0000
@@ -162,6 +162,8 @@
 	aspect_save_screenres(vo_screenwidth,vo_screenheight);
 
 	aspect(&d_width,&d_height,A_NOZOOM);
+	geometry(&vo_dx, &vo_dy, &d_width, &d_height,
+	          vo_screenwidth, vo_screenheight);
 #ifdef X11_FULLSCREEN
 //        if( flags&VOFLAG_FULLSCREEN ){ // (-fs)
 //          aspect(&d_width,&d_height,A_ZOOM);
@@ -186,8 +188,8 @@
 
 	vo_fs = VO_FALSE;
 
-	hint.x = 0;
-	hint.y = 0;
+	hint.x = vo_dx;
+	hint.y = vo_dy;
 	hint.width = d_width;
 	hint.height = d_height;
 	hint.flags = PPosition | PSize;
@@ -241,7 +243,7 @@
   }
       if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
 
-  vo_x11_nofs_sizepos(0, 0, d_width, d_height);
+  vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
   if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
     vo_x11_fullscreen();
   setGlWindow(&gl_vinfo, &gl_context, vo_window);
--- a/libvo/vo_gl2.c	Sun May 29 14:10:01 2005 +0000
+++ b/libvo/vo_gl2.c	Sun May 29 17:04:51 2005 +0000
@@ -692,8 +692,8 @@
 	XVisualInfo *vinfo, vinfo_buf;
 	XEvent xev;
 
-		hint.x = 0;
-		hint.y = 0;
+		hint.x = vo_dx;
+		hint.y = vo_dy;
 		hint.width = d_width;
 		hint.height = d_height;
 		hint.flags = PPosition | PSize;
@@ -745,7 +745,7 @@
 		 | ButtonPressMask | ButtonReleaseMask | ExposureMask
         );
   }
-  vo_x11_nofs_sizepos(0, 0, d_width, d_height);
+  vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
   if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
     vo_x11_fullscreen();
 
@@ -829,6 +829,8 @@
 	aspect_save_screenres(vo_screenwidth,vo_screenheight);
 
 	aspect(&d_width,&d_height,A_NOZOOM);
+	geometry(&vo_dx, &vo_dy, &d_width, &d_height,
+	          vo_screenwidth, vo_screenheight);
 
 #if defined(HAVE_NEW_GUI) && !defined(GL_WIN32)
 	if (use_gui) {