summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-05 18:17:22 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-09-05 18:17:22 +0000
commitadc81aa70fb02d43e4e65c1c8ba9f5a992bd114f (patch)
tree46ce9e3be9c64776007d48474db6f861ba1901d9 /Gui
parentf0d53f735e85f621f8fc44aa52231c3af2c6da1b (diff)
downloadmpv-adc81aa70fb02d43e4e65c1c8ba9f5a992bd114f.tar.bz2
mpv-adc81aa70fb02d43e4e65c1c8ba9f5a992bd114f.tar.xz
fix skin changing, xv fullscreen redraw bug, etc.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1859 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/play.c20
-rw-r--r--Gui/mplayer/play.h1
-rw-r--r--Gui/mplayer/psignal.c9
-rw-r--r--Gui/mplayer/psignal.h1
-rw-r--r--Gui/mplayer/sw.h4
-rw-r--r--Gui/wm/ws.c12
-rw-r--r--Gui/wm/ws.h4
7 files changed, 24 insertions, 27 deletions
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index b1c10a18ac..b1cd724843 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -67,6 +67,8 @@ void mplPlay( void )
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 @@ void ChangeSkin( void )
{ 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 @@ void ChangeSkin( void )
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 --git a/Gui/mplayer/play.h b/Gui/mplayer/play.h
index 4547d7c77d..8de211c51e 100644
--- a/Gui/mplayer/play.h
+++ b/Gui/mplayer/play.h
@@ -87,7 +87,6 @@ extern float mplGetPosition( void );
extern void mplPlayFork( void );
extern void mplSigHandler( int s );
-extern void mplSendMessage( int msg );
extern void mplPlayerThread( void );
extern void ChangeSkin( void );
diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c
index 19c97c7f64..5d3991d4f3 100644
--- a/Gui/mplayer/psignal.c
+++ b/Gui/mplayer/psignal.c
@@ -177,15 +177,6 @@ void mplMainSigHandler( int s )
// 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 --git a/Gui/mplayer/psignal.h b/Gui/mplayer/psignal.h
index 0b3dd02172..58bd1007d5 100644
--- a/Gui/mplayer/psignal.h
+++ b/Gui/mplayer/psignal.h
@@ -57,7 +57,6 @@ extern void gtkSigHandler( int s );
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 --git a/Gui/mplayer/sw.h b/Gui/mplayer/sw.h
index eee66144bc..1496f71ff7 100644
--- a/Gui/mplayer/sw.h
+++ b/Gui/mplayer/sw.h
@@ -13,8 +13,8 @@ void mplSubDraw( wsParamDisplay )
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 --git a/Gui/wm/ws.c b/Gui/wm/ws.c
index 910036a14b..aed376d2d9 100644
--- a/Gui/wm/ws.c
+++ b/Gui/wm/ws.c
@@ -452,7 +452,7 @@ void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,uns
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 @@ void wsDestroyImage( wsTWindow * win )
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 @@ void wsCreateImage( wsTWindow * win )
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 @@ void wsCreateImage( wsTWindow * win )
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 --git a/Gui/wm/ws.h b/Gui/wm/ws.h
index f1d6fddc62..0a4ae445f2 100644
--- a/Gui/wm/ws.h
+++ b/Gui/wm/ws.h
@@ -227,10 +227,10 @@ extern void wsSetMousePosition( wsTWindow * win,int x, int y );
// ----------------------------------------------------------------------------------------------
// 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 );