comparison Gui/mplayer/play.c @ 9202:c2f31ca14a92

- rewrite Jan Spitalnik's patch - fix some nice 10l
author pontscho
date Sat, 01 Feb 2003 16:42:02 +0000
parents aa55f2f0b057
children 64b8c5a07c2c
comparison
equal deleted inserted replaced
9201:419d7ccb0f3b 9202:c2f31ca14a92
35 static int mplGotoTheNext = 1; 35 static int mplGotoTheNext = 1;
36 36
37 void mplFullScreen( void ) 37 void mplFullScreen( void )
38 { 38 {
39 if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return; 39 if ( guiIntfStruct.NoWindow && guiIntfStruct.Playing ) return;
40 #if 0 40
41 static int sx,sy;
42 // if ( !guiIntfStruct.Playing )
43 {
44 wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
45 if ( appMPlayer.subWindow.isFullScreen )
46 {
47 wsResizeWindow( &appMPlayer.subWindow,sx,sy );
48 wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
49 wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
50 appMPlayer.subWindow.isFullScreen=0;
51 }
52 else
53 {
54 sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
55 wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
56 wsMoveWindow( &appMPlayer.subWindow,True,0,0 );
57 wsWindowDecoration( &appMPlayer.subWindow,0 );
58 appMPlayer.subWindow.isFullScreen=1;
59 }
60 vo_fs=appMPlayer.subWindow.isFullScreen;
61 wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
62 }// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; }
63 #else
64 if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) ) 41 if ( ( guiIntfStruct.Playing )&&( appMPlayer.subWindow.isFullScreen ) )
65 { 42 {
66 appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight; 43 appMPlayer.subWindow.OldWidth=guiIntfStruct.MovieWidth; appMPlayer.subWindow.OldHeight=guiIntfStruct.MovieHeight;
67 switch ( appMPlayer.sub.x ) 44 switch ( appMPlayer.sub.x )
68 { 45 {
75 case -1: appMPlayer.subWindow.OldY=( wsMaxY / 2 ) - ( appMPlayer.subWindow.OldHeight / 2 ); break; 52 case -1: appMPlayer.subWindow.OldY=( wsMaxY / 2 ) - ( appMPlayer.subWindow.OldHeight / 2 ); break;
76 case -2: appMPlayer.subWindow.OldY=wsMaxY - appMPlayer.subWindow.OldHeight; break; 53 case -2: appMPlayer.subWindow.OldY=wsMaxY - appMPlayer.subWindow.OldHeight; break;
77 default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break; 54 default: appMPlayer.subWindow.OldY=appMPlayer.sub.y; break;
78 } 55 }
79 } 56 }
80 wsFullScreen( &appMPlayer.subWindow ); 57 if ( guiIntfStruct.Playing || gtkShowVideoWindow ) wsFullScreen( &appMPlayer.subWindow );
81 vo_fs=appMPlayer.subWindow.isFullScreen; 58 fullscreen=vo_fs=appMPlayer.subWindow.isFullScreen;
82 wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen ); 59 wsSetLayer( wsDisplay,appMPlayer.mainWindow.WindowID,appMPlayer.subWindow.isFullScreen );
83 wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen ); 60 wsSetLayer( wsDisplay,appMPlayer.menuWindow.WindowID,appMPlayer.subWindow.isFullScreen );
84 #endif 61
85
86 fullscreen=appMPlayer.subWindow.isFullScreen;
87 if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); 62 if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
88 else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B ); 63 else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.sub.R,appMPlayer.sub.G,appMPlayer.sub.B );
89 } 64 }
90 65
91 extern int mplSubRender; 66 extern int mplSubRender;