fix fullscreen bug es ilyen libvo not initialized bug with gui igy

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5911 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-04-29 22:00:50 +00:00
parent 9ab3c3b38c
commit 958c31db05
4 changed files with 53 additions and 29 deletions

View File

@ -31,6 +31,7 @@ void mplFullScreen( void )
{
static int sx,sy;
#if 0
// if ( !guiIntfStruct.Playing )
{
wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
@ -52,7 +53,10 @@ void mplFullScreen( void )
vo_fs=appMPlayer.subWindow.isFullScreen;
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
}// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; }
#else
wsFullScreen( &appMPlayer.subWindow );
#endif
fullscreen=appMPlayer.subWindow.isFullScreen;
if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );

View File

@ -50,6 +50,7 @@ int wsScreen;
Window wsRootWin;
XEvent wsEvent;
int wsWindowDepth;
int wsWMType = 1;
GC wsHGC;
MotifWmHints wsMotifWmHints;
Atom wsTextProperlyAtom = None;
@ -337,6 +338,7 @@ void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,uns
win->AtomWMSizeHint=XInternAtom( wsDisplay,"WM_SIZE_HINT",False );
win->AtomWMNormalHint=XInternAtom( wsDisplay,"WM_NORMAL_HINT",False );
win->AtomProtocols=XInternAtom( wsDisplay,"WM_PROTOCOLS",False );
#if 0
{
char buf[32]; int i;
sprintf( buf,"_%s_REMOTE",label );
@ -347,6 +349,7 @@ void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,uns
fprintf( stderr,"[ws] atomname: %s\n",buf );
win->AtomRemote=XInternAtom( wsDisplay,buf,False );
}
#endif
win->AtomsProtocols[0]=win->AtomDeleteWindow;
win->AtomsProtocols[1]=win->AtomTakeFocus;
win->AtomsProtocols[2]=win->AtomRolle;
@ -442,10 +445,12 @@ void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,uns
wsTextProperty.nitems=strlen( label );
XSetWMIconName( wsDisplay,win->WindowID,&wsTextProperty );
#if 0
XChangeProperty( wsDisplay,win->WindowID,
win->AtomRemote,XA_STRING,
8,PropModeReplace,
"REALIZED",8 );
#endif
// win->Font=XLoadQueryFont( wsDisplay,"-adobe-helvetica-bold-r-normal--14-140-75-75-p-77-iso8859-1" );
// -adobe-times-medium-r-normal--14-140-75-75-p-77-iso8859-1" );
@ -647,10 +652,20 @@ buttonreleased:
// break;
case PropertyNotify:
// 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
{
char * name = XGetAtomName( wsDisplay,Event->xproperty.atom );
if ( !name ) break;
if ( !strncmp( name,"_ICEWM_TRAY",11 ) ||
!strncmp( name,"_KDE_",5 ) ||
!strncmp( name,"KWM_WIN_DESKTOP",15 ) ) wsWMType=0;
// fprintf(stderr,"[ws] PropertyNotify %s ( 0x%x )\n",name,Event->xproperty.atom );
XFree( name );
break;
}
#if 0
if ( Event->xproperty.atom == wsWindowList[l]->AtomRemote )
{
Atom type;
@ -677,6 +692,7 @@ buttonreleased:
XFree( args );
}
}
#endif
break;
}
@ -741,8 +757,7 @@ while(wsTrue){
void wsFullScreen( wsTWindow * win )
{
int decoration = 0;
XUnmapWindow( wsDisplay,win->WindowID );
win->SizeHint.flags=0;
if ( wsWMType ) XUnmapWindow( wsDisplay,win->WindowID );
if ( win->isFullScreen )
{
win->X=win->OldX;
@ -763,11 +778,11 @@ void wsFullScreen( wsTWindow * win )
wsScreenSaverOff( wsDisplay );
}
win->SizeHint.flags|=PPosition | PSize;
win->SizeHint.x=win->X;
win->SizeHint.y=win->Y;
win->SizeHint.width=win->Width;
win->SizeHint.height=win->Height;
win->SizeHint.flags=PPosition | PSize | PWinGravity | PBaseSize;
win->SizeHint.x=win->X; win->SizeHint.y=win->Y;
win->SizeHint.width=win->Width; win->SizeHint.height=win->Height;
win->SizeHint.base_width=win->Width; win->SizeHint.base_height=win->Height;
win->SizeHint.win_gravity=StaticGravity;
if ( win->Property & wsMaxSize )
{
win->SizeHint.flags|=PMaxSize;
@ -784,8 +799,8 @@ void wsFullScreen( wsTWindow * win )
XMoveResizeWindow( wsDisplay,win->WindowID,win->X,win->Y,win->Width,win->Height );
wsWindowDecoration( win,decoration );
XMapRaised( wsDisplay,win->WindowID );
XRaiseWindow( wsDisplay,win->WindowID );
XMapWindow( wsDisplay,win->WindowID );
}
// ----------------------------------------------------------------------------------------------

View File

@ -542,13 +542,18 @@ int vo_x11_check_events(Display *mydisplay){
break;
#endif
case PropertyNotify:
if ( !strcmp( XGetAtomName( mydisplay,Event.xproperty.atom ),"_ICEWM_TRAY" ) ||
!strncmp( XGetAtomName( mydisplay,Event.xproperty.atom ),"_KDE_",5 ) ||
!strcmp( XGetAtomName( mydisplay,Event.xproperty.atom ),"KWM_WIN_DESKTOP" ) ) vo_wm_type=0;
{
char * name = XGetAtomName( mydisplay,Event.xproperty.atom );
if ( !name ) break;
if ( !strncmp( name,"_ICEWM_TRAY",11 ) ||
!strncmp( name,"_KDE_",5 ) ||
!strncmp( name,"KWM_WIN_DESKTOP",15 ) ) vo_wm_type=0;
fprintf(stderr,"[ws] PropertyNotify ( 0x%x ) %s ( 0x%x )\n",
vo_window,XGetAtomName( mydisplay,Event.xproperty.atom ),Event.xproperty.atom );
vo_window,name,Event.xproperty.atom );
XFree( name );
}
break;
}
}
@ -589,7 +594,7 @@ void vo_x11_fullscreen( void )
vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 );
XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight );
XMapRaised( mDisplay,vo_window );
XRaiseWindow( mDisplay,vo_window );
XFlush( mDisplay );
}

View File

@ -2945,16 +2945,6 @@ if(eof == PT_NEXT_ENTRY || eof == PT_PREV_ENTRY) {
eof = eof == PT_PREV_SRC ? -1 : 1;
}
#ifdef HAVE_NEW_GUI
if( use_gui && !playtree_iter )
{
#ifdef USE_DVDREAD
if ( !guiIntfStruct.DVDChanged )
#endif
mplStop();
}
#endif
if(eof == 0) eof = 1;
while(playtree_iter != NULL) {
@ -2968,6 +2958,16 @@ while(playtree_iter != NULL) {
break;
}
#ifdef HAVE_NEW_GUI
if( use_gui && !playtree_iter )
{
#ifdef USE_DVDREAD
if ( !guiIntfStruct.DVDChanged )
#endif
mplStop();
}
#endif
if(use_gui || playtree_iter != NULL
#if defined( HAVE_NEW_GUI ) && defined( USE_DVDREAD )
|| ( guiIntfStruct.DVDChanged && use_gui )