diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-01 16:42:02 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-02-01 16:42:02 +0000 |
commit | 300a1416e572db7a51902127a512b62fd08374ed (patch) | |
tree | 42cf0af2950d9f4737890c632a62448070fab775 /Gui/interface.c | |
parent | d4408eac05ace7f78c0536e37184177a400bd952 (diff) | |
download | mpv-300a1416e572db7a51902127a512b62fd08374ed.tar.bz2 mpv-300a1416e572db7a51902127a512b62fd08374ed.tar.xz |
- rewrite Jan Spitalnik's patch
- fix some nice 10l
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9203 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/interface.c')
-rw-r--r-- | Gui/interface.c | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/Gui/interface.c b/Gui/interface.c index 45430888ab..ab9bc5f1a2 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -193,10 +193,10 @@ void guiInit( void ) fprintf( stderr,MSGTR_NEMDB ); exit( 0 ); } - + wsCreateWindow( &appMPlayer.subWindow, appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, - wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"ViDEO" ); + wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"MPlayer - Video" ); wsDestroyImage( &appMPlayer.subWindow ); wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height ); @@ -249,7 +249,7 @@ void guiInit( void ) if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 ); wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow ); -#if 1 +#if 0 wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); { @@ -264,6 +264,38 @@ void guiInit( void ) mplFullScreen(); btnModify( evFullScreen,btnPressed ); } +#else + if ( gtkShowVideoWindow ) + { + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + { + XEvent xev; + do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID ); + appMPlayer.subWindow.Mapped=wsMapped; + } + + if ( fullscreen ) + { + mplFullScreen(); + btnModify( evFullScreen,btnPressed ); + } + } + else + { + if ( fullscreen ) + { + wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + { + XEvent xev; + do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID ); + appMPlayer.subWindow.Mapped=wsMapped; + } + wsVisibleWindow( &appMPlayer.subWindow, wsShowWindow ); + + mplFullScreen(); + btnModify( evFullScreen,btnPressed ); + } + } #endif mplSubRender=1; // --- @@ -442,8 +474,14 @@ int guiGetEvent( int type,char * arg ) case guiCEvent: switch ( (int)arg ) { - case guiSetPlay: guiIntfStruct.Playing=1; break; - case guiSetStop: guiIntfStruct.Playing=0; break; + case guiSetPlay: + guiIntfStruct.Playing=1; + if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + break; + case guiSetStop: + guiIntfStruct.Playing=0; + if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + break; case guiSetPause: guiIntfStruct.Playing=2; break; } mplState(); |