[Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.5,1.6

GEREOFFY arpi_esp at users.sourceforge.net
Sat Mar 17 20:19:20 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv27851

Modified Files:
	vo_xmga.c 
Log Message:
common window setup code moved to set_window()

Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** vo_xmga.c	2001/03/13 00:14:47	1.5
--- vo_xmga.c	2001/03/17 19:19:18	1.6
***************
*** 101,123 ****
  }
  
! static void check_events(void)
! {
!     int e=vo_x11_check_events(mDisplay);
  
-     if(e&VO_EVENT_RESIZE){
           XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
!          drwX=0; drwY=0;
           XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
           if ( mFullscreen )
            {
             drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
!            drwcX=drwX;
             drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
!            drwcY=drwY;
             drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
             drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
            }
  
           mDrawColorKey();
           mga_vid_config.x_org=drwcX;
           mga_vid_config.y_org=drwcY;
--- 101,124 ----
  }
  
! static void set_window(){
  
           XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
!          drwX=0; drwY=0; // drwWidth=wndWidth; drwHeight=wndHeight;
           XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
+          fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
+ 
           if ( mFullscreen )
            {
             drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
!            drwcX+=drwX;
             drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
!            drwcY+=drwY;
             drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
             drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
+            fprintf( stderr,"[xmga-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
            }
  
           mDrawColorKey();
+ 
           mga_vid_config.x_org=drwcX;
           mga_vid_config.y_org=drwcY;
***************
*** 125,130 ****
           mga_vid_config.dest_height=drwHeight;
  
!          fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
  
           if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) )
            {
--- 126,137 ----
           mga_vid_config.dest_height=drwHeight;
  
! }
  
+ static void check_events(void)
+ {
+     int e=vo_x11_check_events(mDisplay);
+ 
+     if(e&VO_EVENT_RESIZE){
+          set_window();
           if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) )
            {
***************
*** 252,280 ****
  
   XMapWindow( mDisplay,mWindow );
  
-  XGetGeometry( mDisplay,mWindow,&mRoot,&drwX,&drwY,&drwWidth,&drwHeight,&drwBorderWidth,&drwDepth );
-  drwX=0; drwY=0; drwWidth=wndWidth; drwHeight=wndHeight;
-  XTranslateCoordinates( mDisplay,mWindow,mRoot,0,0,&drwcX,&drwcY,&mRoot );
- 
-  if ( fullscreen )
-   {
-    drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2;
-    drwcX=drwX;
-    drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2;
-    drwcY=drwY;
-    drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth);
-    drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight);
-   }
- 
-  mDrawColorKey();
- 
   mga_vid_config.src_width=width;
   mga_vid_config.src_height=height;
-  mga_vid_config.dest_width=drwWidth;
-  mga_vid_config.dest_height=drwHeight;
-  mga_vid_config.x_org=drwcX;
-  mga_vid_config.y_org=drwcY;
- 
-  fprintf( stderr,"[xmga] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight );
  
   mga_vid_config.colkey_on=1;
--- 259,267 ----
  
   XMapWindow( mDisplay,mWindow );
+  
+  set_window();
  
   mga_vid_config.src_width=width;
   mga_vid_config.src_height=height;
  
   mga_vid_config.colkey_on=1;


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list