# HG changeset patch # User pontscho # Date 999713842 0 # Node ID 88a88d0a3f94919c2e6e5e9fa1c4b35d815699e4 # Parent 5bae42c5577bb003b367b0afe0109ac8c328422d fix skin changing, xv fullscreen redraw bug, etc. diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/mplayer/play.c --- a/Gui/mplayer/play.c Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/mplayer/play.c Wed Sep 05 18:17:22 2001 +0000 @@ -67,6 +67,8 @@ if ( mplShMem->Playing == 2 ) { mplPause(); return; } mplShMem->Playing=1; mplSubRender=0; + wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); + wsClearWindow( appMPlayer.subWindow ); wsPostRedisplay( &appMPlayer.subWindow ); } @@ -162,9 +164,10 @@ { message( False,langNEMDB ); return; } wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height ); wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y ); - wsResizeImage( &appMPlayer.mainWindow ); + wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height ); wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); + btnModify( evSetVolume,mplShMem->Volume ); btnModify( evSetBalance,mplShMem->Balance ); btnModify( evSetMoviePosition,mplShMem->Position ); @@ -175,17 +178,22 @@ if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL ) { message( False,langNEMDB ); return; } wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); - wsResizeImage( &appMPlayer.menuWindow ); + wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height ); } mplSkinChanged=1; + if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height ); if ( !mplShMem->Playing ) { mplSkinChanged=0; - if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow ); - wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); - wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); - if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow ); +// if ( appMPlayer.subWindow.isFullScreen ) wsFullScreen( &appMPlayer.subWindow ); + if ( !appMPlayer.subWindow.isFullScreen ) + { + wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height ); + wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y ); + } + wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB ); + wsClearWindow( appMPlayer.subWindow ); mplSubRender=1; wsPostRedisplay( &appMPlayer.subWindow ); } } diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/mplayer/play.h --- a/Gui/mplayer/play.h Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/mplayer/play.h Wed Sep 05 18:17:22 2001 +0000 @@ -87,7 +87,6 @@ extern void mplPlayFork( void ); extern void mplSigHandler( int s ); -extern void mplSendMessage( int msg ); extern void mplPlayerThread( void ); extern void ChangeSkin( void ); diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/mplayer/psignal.c --- a/Gui/mplayer/psignal.c Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/mplayer/psignal.c Wed Sep 05 18:17:22 2001 +0000 @@ -177,15 +177,6 @@ // mplShMem->message=0; } -void mplSendMessage( int msg ) -{ - if ( !mplShMem->Playing ) return; - mplShMem->message=msg; -// kill( mplMPlayerPID,SIGTYPE ); usleep( 10 ); -// kill( mplMPlayerPID,SIGTYPE ); usleep( 10 ); - kill( mplMPlayerPID,SIGTYPE ); -} - void gtkSendMessage( int msg ) { if ( !gtkIsOk ) return; diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/mplayer/psignal.h --- a/Gui/mplayer/psignal.h Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/mplayer/psignal.h Wed Sep 05 18:17:22 2001 +0000 @@ -57,7 +57,6 @@ extern void mplPlayerSigHandler( int s ); extern void mplMainSigHandler( int s ); -extern void mplSendMessage( int msg ); extern void gtkSendMessage( int msg ); extern void mplErrorHandler( int critical,const char * format, ... ); diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/mplayer/sw.h --- a/Gui/mplayer/sw.h Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/mplayer/sw.h Wed Sep 05 18:17:22 2001 +0000 @@ -13,8 +13,8 @@ if ( mplShMem->Playing ) { - wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); - wsClearWindow( appMPlayer.subWindow ); +// wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); +// wsClearWindow( appMPlayer.subWindow ); vo_expose=1; mplSubRender=0; } diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/wm/ws.c --- a/Gui/wm/ws.c Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/wm/ws.c Wed Sep 05 18:17:22 2001 +0000 @@ -452,7 +452,7 @@ win->Rolled=0; if ( D & wsShowWindow ) XMapWindow( wsDisplay,win->WindowID ); - wsCreateImage( win ); + wsCreateImage( win,win->Width,win->Height ); // --- End of creating -------------------------------------------------------------------------- wsWindowList[wsWLCount++]=win; @@ -1006,14 +1006,14 @@ win->xImage=NULL; } -void wsCreateImage( wsTWindow * win ) +void wsCreateImage( wsTWindow * win,int Width,int Height ) { int CompletionType = -1; if ( wsUseXShm ) { CompletionType=XShmGetEventBase( wsDisplay ) + ShmCompletion; win->xImage=XShmCreateImage( wsDisplay,win->VisualInfo.visual, - win->Attribs.depth,ZPixmap,NULL,&win->Shminfo,win->Width,win->Height ); + win->Attribs.depth,ZPixmap,NULL,&win->Shminfo,Width,Height ); if ( win->xImage == NULL ) { fprintf( stderr,"[ws] shared memory extension error.\n" ); @@ -1046,7 +1046,7 @@ else { win->xImage=XCreateImage( wsDisplay,win->VisualInfo.visual,win->Attribs.depth, - ZPixmap,0,0,win->Width,win->Height, + ZPixmap,0,0,Width,Height, (wsDepthOnScreen == 3) ? 32 : wsDepthOnScreen, 0 ); if ( ( win->xImage->data=malloc( win->xImage->bytes_per_line * win->xImage->height ) ) == NULL ) @@ -1060,8 +1060,8 @@ win->ImageDatadw=(unsigned int *)win->xImage->data; } -void wsResizeImage( wsTWindow * win ) -{ wsDestroyImage( win ); wsCreateImage( win ); } +void wsResizeImage( wsTWindow * win,int Width,int Height ) +{ wsDestroyImage( win ); wsCreateImage( win,Width,Height ); } int wsGetOutMask( void ) { diff -r 5bae42c5577b -r 88a88d0a3f94 Gui/wm/ws.h --- a/Gui/wm/ws.h Wed Sep 05 11:00:11 2001 +0000 +++ b/Gui/wm/ws.h Wed Sep 05 18:17:22 2001 +0000 @@ -227,10 +227,10 @@ // ---------------------------------------------------------------------------------------------- // Image handling // ---------------------------------------------------------------------------------------------- -extern void wsCreateImage( wsTWindow * win ); +extern void wsCreateImage( wsTWindow * win,int Width,int Height ); extern void wsConvert( wsTWindow * win,unsigned char * Image,unsigned int Size ); extern void wsPutImage( wsTWindow * win ); -extern void wsResizeImage( wsTWindow * win ); +extern void wsResizeImage( wsTWindow * win,int Width,int Height ); extern void wsDestroyImage( wsTWindow * win ); extern int wsGetOutMask( void ); diff -r 5bae42c5577b -r 88a88d0a3f94 libvo/vo_xv.c --- a/libvo/vo_xv.c Wed Sep 05 11:00:11 2001 +0000 +++ b/libvo/vo_xv.c Wed Sep 05 18:17:22 2001 +0000 @@ -357,6 +357,11 @@ printf( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); } } + if ( e & VO_EVENT_EXPOSE ) + { + XvShmPutImage(mDisplay, xv_port, mywindow, mygc, xvimage[current_buf], 0, 0, image_width, image_height, drwX, drwY, 1, 1, False); + XvShmPutImage(mDisplay, xv_port, mywindow, mygc, xvimage[current_buf], 0, 0, image_width, image_height, drwX,drwY,drwWidth,(mFullscreen?drwHeight - 1:drwHeight), False); + } } static void draw_osd(void)