[MPlayer-dev-eng] [PATCH] GUI double/normal size

Alexander Strasser eclipse7 at gmx.net
Mon Oct 18 00:57:47 CEST 2004


Since one of my early EWMH fs patches the GUI doublesize and normal
size features are broken on EWMH WMs because double and normal size
switches were implemented through wsFullScreen function. This patch
should restore the functionality, please test and report results.

.so if you are reading this, please comment.

Thanks in advance,
  Alex (beastd)
-------------- next part --------------
Index: Gui/mplayer/mw.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.c,v
retrieving revision 1.111
diff -u -r1.111 mw.c
--- Gui/mplayer/mw.c	26 Jun 2004 13:26:11 -0000	1.111
+++ Gui/mplayer/mw.c	13 Oct 2004 23:26:12 -0000
@@ -283,26 +283,32 @@
     	btnSet( evFullScreen,btnReleased );
         if ( guiIntfStruct.Playing )
          {
-          appMPlayer.subWindow.isFullScreen=True;
-          appMPlayer.subWindow.OldX=( wsMaxX - guiIntfStruct.MovieWidth * 2 ) / 2 + wsOrgX;
-          appMPlayer.subWindow.OldY=( wsMaxY - guiIntfStruct.MovieHeight * 2 ) / 2 + wsOrgY;
-          appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth * 2; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight * 2;
-          wsFullScreen( &appMPlayer.subWindow );
-	  vo_fs=0;
+          if ( appMPlayer.subWindow.isFullScreen )
+           {
+            mplFullScreen();
+           }
+          wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth * 2, guiIntfStruct.MovieHeight * 2 );
+          wsMoveWindow( &appMPlayer.subWindow, 0,
+                        ( wsMaxX - guiIntfStruct.MovieWidth*2  )/2 + wsOrgX,
+                        ( wsMaxY - guiIntfStruct.MovieHeight*2 )/2 + wsOrgY  );
          }
+XSync( mDisplay, False );
         break;
    case evNormalSize:
 	btnSet( evFullScreen,btnReleased );
         if ( guiIntfStruct.Playing )
          {
-          appMPlayer.subWindow.isFullScreen=True;
-          appMPlayer.subWindow.OldX=( wsMaxX - guiIntfStruct.MovieWidth ) / 2 + wsOrgX;
-          appMPlayer.subWindow.OldY=( wsMaxY - guiIntfStruct.MovieHeight ) / 2 + wsOrgY;
-          appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight;
-          wsFullScreen( &appMPlayer.subWindow );
-	  vo_fs=0;
+          if ( appMPlayer.subWindow.isFullScreen )
+           {
+            mplFullScreen();
+           }
+          wsResizeWindow( &appMPlayer.subWindow, guiIntfStruct.MovieWidth, guiIntfStruct.MovieHeight );
+          wsMoveWindow( &appMPlayer.subWindow, 0,
+                        ( wsMaxX - guiIntfStruct.MovieWidth  )/2 + wsOrgX,
+                        ( wsMaxY - guiIntfStruct.MovieHeight )/2 + wsOrgY  );
 	  break;
          } else if ( !appMPlayer.subWindow.isFullScreen ) break;
+XSync( mDisplay, False );
    case evFullScreen:
         if ( !guiIntfStruct.Playing && !gtkShowVideoWindow ) break;
         mplFullScreen();


More information about the MPlayer-dev-eng mailing list