[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.80,1.81 x11_common.c,1.70,1.71

Arpi of Ize arpi at mplayerhq.hu
Sun May 5 17:34:00 CEST 2002


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

Modified Files:
	vo_xv.c x11_common.c 
Log Message:
- the "black bars" in xv bug fixed (drwX=drwY=0)
- -fsmode is working again
- BaseSize flag for upscale-only Xv drivers (disabled now)
patch by Tom Lees <tal26 at cam.ac.uk>



Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- vo_xv.c	4 May 2002 22:34:47 -0000	1.80
+++ vo_xv.c	5 May 2002 15:33:50 -0000	1.81
@@ -401,7 +401,8 @@
     }
 //   dwidth=d_width; dheight=d_height; //XXX: what are the copy vars used for?
    vo_dwidth=d_width; vo_dheight=d_height;
-   hint.flags = PPosition | PSize;
+   hint.flags = PPosition | PSize /* | PBaseSize */;
+   hint.base_width = hint.width; hint.base_height = hint.height;
    XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs);
    depth=attribs.depth;
    if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24;
@@ -432,6 +433,7 @@
 	))
    );
    XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
+   XSetWMNormalHints( mDisplay,vo_window,&hint );
    if ( vo_fs ) vo_x11_decoration( mDisplay,vo_window,0 );
    XMapWindow(mDisplay, vo_window);
 #ifdef HAVE_XINERAMA
@@ -552,6 +554,7 @@
  if(e&VO_EVENT_RESIZE)
   {
    XGetGeometry( mDisplay,vo_window,&mRoot,&drwX,&drwY,&vo_dwidth,&vo_dheight,&drwBorderWidth,&drwDepth );
+   drwX = drwY = 0;
    mp_msg(MSGT_VO,MSGL_V, "[xv] dx: %d dy: %d dw: %d dh: %d\n",drwX,drwY,vo_dwidth,vo_dheight );
 
    aspect(&dwidth,&dheight,A_NOZOOM);

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- x11_common.c	3 May 2002 20:57:13 -0000	1.70
+++ x11_common.c	5 May 2002 15:33:50 -0000	1.71
@@ -390,10 +390,9 @@
 
   if ( !WinID ) return;
 
-#if 0
   if(vo_fsmode&1){
     XSetWindowAttributes attr;
-    attr.override_redirect = True;
+    attr.override_redirect = (!d) ? True : False;
     XChangeWindowAttributes(vo_Display, w, CWOverrideRedirect, &attr);
 //    XMapWindow(vo_Display, w);
   }
@@ -401,7 +400,6 @@
   if(vo_fsmode&8){
     XSetTransientForHint (vo_Display, w, RootWindow(vo_Display,mScreen));
   }
-#endif
 
  vo_MotifHints=XInternAtom( vo_Display,"_MOTIF_WM_HINTS",0 );
  if ( vo_MotifHints != None )
@@ -588,16 +586,15 @@
    vo_fs=VO_TRUE;
    vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth;   vo_old_height=vo_dheight;
    vo_dx=0;        vo_dy=0;        vo_dwidth=vo_screenwidth; vo_dheight=vo_screenheight;
-   vo_x11_decoration( mDisplay,vo_window,0 );
   }
   else
    {
     vo_fs=VO_FALSE;
     vo_dx=vo_old_x; vo_dy=vo_old_y; vo_dwidth=vo_old_width; vo_dheight=vo_old_height;
-    vo_x11_decoration( mDisplay,vo_window,1 );
    }
  vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 );
  XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight );
+ vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 );
  XMapRaised( mDisplay,vo_window );
  
  XRaiseWindow( mDisplay,vo_window );




More information about the MPlayer-cvslog mailing list