changeset 2029:41ed89701ece

fix fucking icewm fullscreen bug.
author pontscho
date Mon, 01 Oct 2001 12:28:39 +0000
parents 64a53c27b944
children 68dbb349566e
files Gui/mplayer/mplayer.c Gui/mplayer/play.c Gui/mplayer/sw.h Gui/wm/ws.c
diffstat 4 files changed, 25 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mplayer.c	Mon Oct 01 09:56:53 2001 +0000
+++ b/Gui/mplayer/mplayer.c	Mon Oct 01 12:28:39 2001 +0000
@@ -104,6 +104,7 @@
  appMPlayer.subWindow.KeyHandler=mplMainKeyHandle;
  appMPlayer.subWindow.ReSize=mplResize;
 
+ 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 );
 
  wsPostRedisplay( &appMPlayer.mainWindow );
--- a/Gui/mplayer/play.c	Mon Oct 01 09:56:53 2001 +0000
+++ b/Gui/mplayer/play.c	Mon Oct 01 12:28:39 2001 +0000
@@ -35,10 +35,24 @@
 
 void mplFullScreen( void )
 {
-// if ( appMPlayer.subWindow.isFullScreen )
-//  {
-//  }
- wsFullScreen( &appMPlayer.subWindow ); 
+ static int sx,sy;
+ wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+ if ( appMPlayer.subWindow.isFullScreen )
+  {
+   wsResizeWindow( &appMPlayer.subWindow,sx,sy );
+   wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
+   wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
+   appMPlayer.subWindow.isFullScreen=0;
+  }
+  else
+   {
+    sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
+    wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
+    wsMoveWindow( &appMPlayer.subWindow,0,0 );
+    wsWindowDecoration( &appMPlayer.subWindow,0 );
+    appMPlayer.subWindow.isFullScreen=1;
+   }
+ wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
  mplResize( 0,0,appMPlayer.subWindow.Width,appMPlayer.subWindow.Height );
 }
 
--- a/Gui/mplayer/sw.h	Mon Oct 01 09:56:53 2001 +0000
+++ b/Gui/mplayer/sw.h	Mon Oct 01 12:28:39 2001 +0000
@@ -13,20 +13,13 @@
 
  if ( mplShMem->Playing )
   { 
-//   wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
-//   wsClearWindow( appMPlayer.subWindow );
    vo_expose=1; 
    mplSubRender=0;
   }
 
  if ( mplSubRender )
   {
-//   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 );
-    } 
+   if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
 //   XFlush( wsDisplay );
   }
  appMPlayer.subWindow.State=0; 
--- a/Gui/wm/ws.c	Mon Oct 01 09:56:53 2001 +0000
+++ b/Gui/wm/ws.c	Mon Oct 01 12:28:39 2001 +0000
@@ -193,9 +193,10 @@
   {
    int minor,major,shp;
    fprintf( stderr,"[ws] Screen depth: %d\n",wsDepthOnScreen );
-   fprintf( stderr,"[ws] red mask: 0x%x\n",wsRedMask );
-   fprintf( stderr,"[ws] green mask: 0x%x\n",wsGreenMask );
-   fprintf( stderr,"[ws] blue mask: 0x%x\n",wsBlueMask );
+   fprintf( stderr,"[ws]  size: %dx%d\n",wsMaxX,wsMaxY );
+   fprintf( stderr,"[ws]  red mask: 0x%x\n",wsRedMask );
+   fprintf( stderr,"[ws]  green mask: 0x%x\n",wsGreenMask );
+   fprintf( stderr,"[ws]  blue mask: 0x%x\n",wsBlueMask );
    if ( wsUseXShm )
     {
      XShmQueryVersion( wsDisplay,&major,&minor,&shp );
@@ -366,7 +367,7 @@
   win->WindowMask,&win->WindowAttrib );
 
  wsClassHint.res_name=label;
- wsClassHint.res_class="mPlayer";
+ wsClassHint.res_class="MPlayer";
  XSetClassHint( wsDisplay,win->WindowID,&wsClassHint );
 
  win->SizeHint.flags=PPosition | PSize | PResizeInc; // | PBaseSize