changeset 1798:ddeafb1dbc73

fix sub redraw
author pontscho
date Fri, 31 Aug 2001 11:27:21 +0000
parents d1aabeb7274f
children b26a936b24e4
files Gui/mplayer/mw.h Gui/mplayer/sw.h
diffstat 2 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mw.h	Fri Aug 31 11:26:14 2001 +0000
+++ b/Gui/mplayer/mw.h	Fri Aug 31 11:27:21 2001 +0000
@@ -354,7 +354,7 @@
         mplMainRender=1;
         wsPostRedisplay( &appMPlayer.mainWindow );
 //        if ( !mplShMem->Playing ) 
-	wsPostRedisplay( &appMPlayer.subWindow );
+//	wsPostRedisplay( &appMPlayer.subWindow );
         XFlush( wsDisplay );
 	mplRedrawTimer=mplRedrawTimerConst;
         break;
--- a/Gui/mplayer/sw.h	Fri Aug 31 11:26:14 2001 +0000
+++ b/Gui/mplayer/sw.h	Fri Aug 31 11:27:21 2001 +0000
@@ -6,17 +6,27 @@
 
 void mplSubDraw( wsParamDisplay )
 {
- if ( appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
+ if ( ( appMPlayer.subWindow.Visible == wsWindowNotVisible )||
+      ( appMPlayer.subWindow.State != wsWindowExpose ) ) return;
+
  if ( ( mplShMem->Playing )&&( appMPlayer.subWindow.State == wsWindowExpose ) )
-  { appMPlayer.subWindow.State=0; vo_expose=1; return; }
+  { 
+   wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
+   wsClearWindow( appMPlayer.subWindow );
+   appMPlayer.subWindow.State=0; 
+   vo_expose=1; 
+   return; 
+  }
 
  if ( mplSubRender )
   {
    wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
    wsClearWindow( appMPlayer.subWindow );
-   if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
-   mplSubRender=0;
-   if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
+   if ( appMPlayer.sub.Bitmap.Image ) 
+    {
+     wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
+     wsPutImage( &appMPlayer.subWindow );
+    } 
    XFlush( wsDisplay );
   }
 }