changeset 2045:deb4aff05c44

fix other bugs
author pontscho
date Tue, 02 Oct 2001 15:01:56 +0000
parents 22af88697263
children db1880f741d4
files Gui/mplayer/mw.h Gui/mplayer/play.c Gui/mplayer/sw.h Gui/wm/ws.c
diffstat 4 files changed, 27 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mw.h	Tue Oct 02 08:31:46 2001 +0000
+++ b/Gui/mplayer/mw.h	Tue Oct 02 15:01:56 2001 +0000
@@ -17,7 +17,7 @@
  static char   trbuf[512];
         char   tmp[128];
         int    i,c;
-        int    t,h,m,s;
+        int    t;
  memset( trbuf,0,512 );
  memset( tmp,0,128 );
  for ( c=0,i=0;i < strlen( str );i++ )
--- a/Gui/mplayer/play.c	Tue Oct 02 08:31:46 2001 +0000
+++ b/Gui/mplayer/play.c	Tue Oct 02 15:01:56 2001 +0000
@@ -52,6 +52,8 @@
     wsWindowDecoration( &appMPlayer.subWindow,0 );
     appMPlayer.subWindow.isFullScreen=1;
    }
+ if ( mplShMem->Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
+  else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
  wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
  mplResize( 0,0,appMPlayer.subWindow.Width,appMPlayer.subWindow.Height );
 }
@@ -71,8 +73,8 @@
    wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
   }
  mplSubRender=1;
+ wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
  wsClearWindow( appMPlayer.subWindow );
- wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
  wsPostRedisplay( &appMPlayer.subWindow );
 }
 
--- a/Gui/mplayer/sw.h	Tue Oct 02 08:31:46 2001 +0000
+++ b/Gui/mplayer/sw.h	Tue Oct 02 15:01:56 2001 +0000
@@ -6,7 +6,8 @@
 
 void mplSubDraw( wsParamDisplay )
 {
- if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible=0;
+ if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
+ 
  if ( !appMPlayer.subWindow.Mapped ||
       appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
 
@@ -64,8 +65,16 @@
 //          if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
           if ( !mplSubMoved )
 	   {
-	    if( SubVisible++%2 ) wsMoveTopWindow( &appMPlayer.subWindow );
-	     else wsMoveTopWindow( &appMPlayer.mainWindow );
+	    if( SubVisible++%2 )
+	     {
+	      wsMoveTopWindow( &appMPlayer.mainWindow );
+	      fprintf( stderr,"[sw] MAIN TOP\n" );
+	     } 
+	     else 
+	      {
+	       wsMoveTopWindow( &appMPlayer.subWindow );
+	       fprintf( stderr,"[sw] SUB TOP\n" );
+	      }
 	   }
           msButton=0;
           mplSubMoved=0;
--- a/Gui/wm/ws.c	Tue Oct 02 08:31:46 2001 +0000
+++ b/Gui/wm/ws.c	Tue Oct 02 15:01:56 2001 +0000
@@ -613,8 +613,10 @@
         break;
 
    case PropertyNotify:
-	break;
-        fprintf(stderr,"[ws] PropertyNotify %s\n",XGetAtomName( wsDisplay,Event->xproperty.atom ) );
+//	break;
+//	#ifdef DEBUG
+//         fprintf(stderr,"[ws] PropertyNotify ( 0x%x ) %s ( 0x%x )\n",wsWindowList[l]->WindowID,XGetAtomName( wsDisplay,Event->xproperty.atom ),Event->xproperty.atom );
+//	#endif
         if ( Event->xproperty.atom == wsWindowList[l]->AtomRemote )
          {
           Atom            type;
@@ -634,6 +636,9 @@
            {
             args[strlen( args ) - 1]=0;
             wsWindowList[l]->RemoteHandler( args );
+	    #ifdef DEBUG
+ 	     fprintf( stderr,"[ws]   args: '%s'\n",args );
+	    #endif
             args[strlen( args ) - 1]=1;
             XFree( args );
            }
@@ -856,8 +861,10 @@
 //    Move top the window.
 // ----------------------------------------------------------------------------------------------
 void wsMoveTopWindow( wsTWindow * win )
-{ XRaiseWindow( wsDisplay,win->WindowID ); }
-//{ XUnmapWindow( wsDisplay,win->WindowID ); XMapWindow( wsDisplay,win->WindowID ); }
+{ 
+// XUnmapWindow( wsDisplay,win->WindowID ); XMapWindow( wsDisplay,win->WindowID ); 
+ XRaiseWindow( wsDisplay,win->WindowID ); 
+}
 
 // ----------------------------------------------------------------------------------------------
 //    Set window background to 'color'.
@@ -897,7 +904,6 @@
    case wsBGR15: PACK_RGB15( b,g,r,color ); break;
   }
  XSetForeground( wsDisplay,win->wGC,color );
-// XSetWindowBackground( wsDisplay,win->WindowID,color );
 }
 
 // ----------------------------------------------------------------------------------------------