[Mplayer-cvslog] CVS: main/Gui/mplayer play.c,1.23,1.24 sw.h,1.10,1.11

Zoltan Ponekker pontscho at mplayer.dev.hu
Tue Sep 4 17:21:01 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv12902/Gui/mplayer

Modified Files:
	play.c sw.h 
Log Message:
fix xshape, mixer, fullscreen, etc

Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- play.c	3 Sep 2001 16:13:12 -0000	1.23
+++ play.c	4 Sep 2001 15:20:59 -0000	1.24
@@ -66,8 +66,8 @@
       ( mplShMem->Playing == 1 ) ) return;
  if ( mplShMem->Playing == 2 ) { mplPause(); return; }
  mplShMem->Playing=1;
- wsClearWindow( appMPlayer.subWindow );
  mplSubRender=0;
+ wsPostRedisplay( &appMPlayer.subWindow );
 }
 
 void mplPause( void )
@@ -90,7 +90,7 @@
 
 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
 {
- printf( "----resize---> %dx%d --- \n",width,height );
+// printf( "----resize---> %dx%d --- \n",width,height );
  vo_setwindowsize( width,height );
  vo_resize=1;
 }

Index: sw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/sw.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sw.h	2 Sep 2001 18:30:55 -0000	1.10
+++ sw.h	4 Sep 2001 15:20:59 -0000	1.11
@@ -2,25 +2,30 @@
 // sub window
 
 int             mplSubRender = 1;
+int             SubVisible = 0;
 
 void mplSubDraw( wsParamDisplay )
 {
+ if ( appMPlayer.subWindow.State == wsFocused ||
+      appMPlayer.subWindow.State ==
+ 
+ ) SubVisible=0;
+ 
+ if ( !appMPlayer.subWindow.Mapped ||
+      appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
 
-// if ( ( appMPlayer.subWindow.Visible == wsWindowNotVisible )||
-//      ( appMPlayer.subWindow.State != wsWindowExpose ) ) return;
-
- if ( ( mplShMem->Playing ) )//&&( appMPlayer.subWindow.State == wsWindowExpose ) )
+ if ( mplShMem->Playing )
   { 
+   wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
+   wsClearWindow( appMPlayer.subWindow );
    vo_expose=1; 
    mplSubRender=0;
   }
 
  if ( mplSubRender )
   {
-   wsSetForegroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
-   XFillRectangle( wsDisplay,appMPlayer.subWindow.WindowID,appMPlayer.subWindow.wGC,0,0,
-    appMPlayer.subWindow.Width,appMPlayer.subWindow.Height );
-   if ( appMPlayer.sub.Bitmap.Image ) 
+   wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
+   if ( appMPlayer.sub.Bitmap.Image )
     {
      wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
      wsPutImage( &appMPlayer.subWindow );
@@ -67,6 +72,7 @@
            }
           break;
    case wsRLMouseButton:
+          if ( ( !mplSubMoved )&&( !( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
           msButton=0;
           mplSubMoved=0;
           break;




More information about the MPlayer-cvslog mailing list