[Mplayer-cvslog] CVS: main/libvo vo_xv.c,1.26,1.27

Zoltan Ponekker pontscho at mplayer.dev.hu
Thu Aug 30 18:05:12 CEST 2001


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

Modified Files:
	vo_xv.c 
Log Message:
fix gui support

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- vo_xv.c	23 Aug 2001 11:04:23 -0000	1.26
+++ vo_xv.c	30 Aug 2001 16:05:04 -0000	1.27
@@ -90,7 +90,7 @@
 static uint32_t               drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth;
 static uint32_t               drwcX,drwcY,dwidth,dheight,mFullscreen;
 
-#ifdef HAVE_GUI
+#ifdef HAVE_NEW_GUI
  static uint32_t               mdwidth,mdheight;
 #endif
 
@@ -135,13 +135,18 @@
  image_width = width;
  image_format=format;
 
+#ifdef HAVE_NEW_GUI
+ mdwidth=width;
+ mdheight=height;
+#endif
+
  mFullscreen=flags&1;
  dwidth=d_width; dheight=d_height;
  num_buffers=vo_doublebuffering?NUM_BUFFERS:1;
  
  if (!vo_init()) return -1;
 
-#ifdef HAVE_GUI
+#ifdef HAVE_NEW_GUI
  if ( vo_window == None )
   {
 #endif
@@ -174,25 +179,18 @@
    XSetStandardProperties(mDisplay, mywindow, hello, hello, None, NULL, 0, &hint);
    if ( mFullscreen ) vo_x11_decoration( mDisplay,mywindow,0 );
    XMapWindow(mDisplay, mywindow);
+   mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv);
    XFlush(mDisplay);
    XSync(mDisplay, False);
-#ifdef HAVE_GUI
+#ifdef HAVE_NEW_GUI
   }
   else
     {
      mywindow=vo_window;
      mygc=vo_gc;
-     if ( vo_screenwidth != d_width )
-      {
-       XMoveWindow( mDisplay,mywindow,( vo_screenwidth - d_width ) / 2,( vo_screenheight - d_height ) / 2 );
-       XResizeWindow( mDisplay,mywindow,d_width,d_height );
-      }
-      else mFullscreen=1;
     }
 #endif
 
- mygc = XCreateGC(mDisplay, mywindow, 0L, &xgcv);
-
  xv_port = 0;
  if (Success == XvQueryExtension(mDisplay,&ver,&rel,&req,&ev,&err))
   {
@@ -309,7 +307,7 @@
    XTranslateCoordinates( mDisplay,mywindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
    printf( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
 
-   #ifdef HAVE_GUI
+   #ifdef HAVE_NEW_GUI
     if ( vo_window != None )
      {
       mFullscreen=0;




More information about the MPlayer-cvslog mailing list