mirror of https://github.com/mpv-player/mpv
move bug meg fileload bug fixed asszem.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2855 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a99541ef7d
commit
ed79f1f1dd
|
@ -79,7 +79,7 @@ void mplShowMenu( int mx,int my )
|
||||||
|
|
||||||
mplMenuItem = 0;
|
mplMenuItem = 0;
|
||||||
|
|
||||||
wsMoveWindow( &appMPlayer.menuWindow,x,y );
|
wsMoveWindow( &appMPlayer.menuWindow,False,x,y );
|
||||||
wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
|
wsVisibleWindow( &appMPlayer.menuWindow,wsShowWindow );
|
||||||
wsMoveTopWindow( &appMPlayer.menuWindow );
|
wsMoveTopWindow( &appMPlayer.menuWindow );
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,15 +50,16 @@ void mplTimerHandler( int signum )
|
||||||
void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
void mplInit( int argc,char* argv[], char *envp[], void* disp )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
// allocates shmem to gtkShMem
|
|
||||||
// fork() a process which runs gtkThreadProc() [gtkPID]
|
|
||||||
gtkInit( argc,argv,envp );
|
|
||||||
strcpy( gtkShMem->sb.name,skinName );
|
|
||||||
|
|
||||||
// allocates shmem to mplShMem
|
// allocates shmem to mplShMem
|
||||||
// init fields of this struct to default values
|
// init fields of this struct to default values
|
||||||
mplMPlayerInit( argc,argv,envp );
|
mplMPlayerInit( argc,argv,envp );
|
||||||
|
|
||||||
|
// allocates shmem to gtkShMem
|
||||||
|
// fork() a process which runs gtkThreadProc() [gtkPID]
|
||||||
|
gtkInit( argc,argv,envp );
|
||||||
|
strcpy( gtkShMem->sb.name,skinName );
|
||||||
|
|
||||||
message=mplErrorHandler; // error messagebox drawing function
|
message=mplErrorHandler; // error messagebox drawing function
|
||||||
|
|
||||||
// opens X display, checks for extensions (XShape, DGA etc)
|
// opens X display, checks for extensions (XShape, DGA etc)
|
||||||
|
|
|
@ -170,10 +170,6 @@ void mplMainDraw( wsParamDisplay )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- erosen ideiglenes.
|
|
||||||
strcpy( gtkShMem->fs.filename,mplShMem->Filename );
|
|
||||||
// ---
|
|
||||||
|
|
||||||
if ( mplMainRender )
|
if ( mplMainRender )
|
||||||
{
|
{
|
||||||
memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
|
memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize );
|
||||||
|
@ -212,7 +208,7 @@ drawrenderedtext:
|
||||||
mplMainRender=0;
|
mplMainRender=0;
|
||||||
}
|
}
|
||||||
wsPutImage( &appMPlayer.mainWindow );
|
wsPutImage( &appMPlayer.mainWindow );
|
||||||
XFlush( wsDisplay );
|
// XFlush( wsDisplay );
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IZE(x) printf("@@@ " x " @@@\n");
|
#define IZE(x) printf("@@@ " x " @@@\n");
|
||||||
|
@ -501,7 +497,7 @@ rollerhandled:
|
||||||
switch ( itemtype )
|
switch ( itemtype )
|
||||||
{
|
{
|
||||||
case itPLMButton:
|
case itPLMButton:
|
||||||
wsMoveWindow( &appMPlayer.mainWindow,RX - abs( sx ),RY - abs( sy ) );
|
wsMoveWindow( &appMPlayer.mainWindow,False,RX - abs( sx ),RY - abs( sy ) );
|
||||||
mplMainRender=0;
|
mplMainRender=0;
|
||||||
break;
|
break;
|
||||||
case itPRMButton:
|
case itPRMButton:
|
||||||
|
|
|
@ -40,7 +40,7 @@ void mplFullScreen( void )
|
||||||
if ( appMPlayer.subWindow.isFullScreen )
|
if ( appMPlayer.subWindow.isFullScreen )
|
||||||
{
|
{
|
||||||
wsResizeWindow( &appMPlayer.subWindow,sx,sy );
|
wsResizeWindow( &appMPlayer.subWindow,sx,sy );
|
||||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||||
wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
|
wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
|
||||||
appMPlayer.subWindow.isFullScreen=0;
|
appMPlayer.subWindow.isFullScreen=0;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ void mplFullScreen( void )
|
||||||
{
|
{
|
||||||
sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
|
sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
|
||||||
wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
|
wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
|
||||||
wsMoveWindow( &appMPlayer.subWindow,0,0 );
|
wsMoveWindow( &appMPlayer.subWindow,True,0,0 );
|
||||||
wsWindowDecoration( &appMPlayer.subWindow,0 );
|
wsWindowDecoration( &appMPlayer.subWindow,0 );
|
||||||
appMPlayer.subWindow.isFullScreen=1;
|
appMPlayer.subWindow.isFullScreen=1;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ void mplStop()
|
||||||
if ( !appMPlayer.subWindow.isFullScreen )
|
if ( !appMPlayer.subWindow.isFullScreen )
|
||||||
{
|
{
|
||||||
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
||||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||||
}
|
}
|
||||||
mplSubRender=1;
|
mplSubRender=1;
|
||||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||||
|
@ -183,7 +183,7 @@ void ChangeSkin( void )
|
||||||
if ( ( !appMPlayer.subWindow.isFullScreen )&&( !mplShMem->Playing ) )
|
if ( ( !appMPlayer.subWindow.isFullScreen )&&( !mplShMem->Playing ) )
|
||||||
{
|
{
|
||||||
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
|
||||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||||
}
|
}
|
||||||
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
||||||
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
||||||
|
@ -199,7 +199,7 @@ void ChangeSkin( void )
|
||||||
{ message( False,MSGTR_NEMDB ); return; }
|
{ message( False,MSGTR_NEMDB ); return; }
|
||||||
wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
|
wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
|
||||||
wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
||||||
wsMoveWindow( &appMPlayer.mainWindow,appMPlayer.main.x,appMPlayer.main.y );
|
wsMoveWindow( &appMPlayer.mainWindow,True,appMPlayer.main.x,appMPlayer.main.y );
|
||||||
wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
|
||||||
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
|
||||||
mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
|
mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
|
||||||
|
@ -222,6 +222,11 @@ void mplResizeToMovieSize( unsigned int width,unsigned int height )
|
||||||
if ( !appMPlayer.subWindow.isFullScreen )
|
if ( !appMPlayer.subWindow.isFullScreen )
|
||||||
{
|
{
|
||||||
wsResizeWindow( &appMPlayer.subWindow,width,height );
|
wsResizeWindow( &appMPlayer.subWindow,width,height );
|
||||||
wsMoveWindow( &appMPlayer.subWindow,appMPlayer.sub.x,appMPlayer.sub.y );
|
wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mplSetFileName( char * fname )
|
||||||
|
{
|
||||||
|
if ( ( fname )&&( gtkShMem ) ) strcpy( gtkShMem->fs.filename,fname );
|
||||||
|
}
|
||||||
|
|
|
@ -91,4 +91,6 @@ extern void mplPlayerThread( void );
|
||||||
extern void ChangeSkin( void );
|
extern void ChangeSkin( void );
|
||||||
extern void EventHandling( void );
|
extern void EventHandling( void );
|
||||||
|
|
||||||
|
extern void mplSetFileName( char * fname );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,7 +54,7 @@ void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
|
||||||
{
|
{
|
||||||
case wsPLMouseButton:
|
case wsPLMouseButton:
|
||||||
mplSubMoved=1;
|
mplSubMoved=1;
|
||||||
if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,RX - sx,RY - sy );
|
if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
|
||||||
break;
|
break;
|
||||||
case wsPRMouseButton:
|
case wsPRMouseButton:
|
||||||
mplMenuMouseHandle( X,Y,RX,RY );
|
mplMenuMouseHandle( X,Y,RX,RY );
|
||||||
|
|
38
Gui/wm/ws.c
38
Gui/wm/ws.c
|
@ -107,7 +107,6 @@ inline int wsSearch( Window win );
|
||||||
|
|
||||||
void wsWindowDecoration( wsTWindow * win,long d )
|
void wsWindowDecoration( wsTWindow * win,long d )
|
||||||
{
|
{
|
||||||
//XUnmapWindow( wsDisplay,win->WindowID );
|
|
||||||
wsMotifHints=XInternAtom( wsDisplay,"_MOTIF_WM_HINTS",0 );
|
wsMotifHints=XInternAtom( wsDisplay,"_MOTIF_WM_HINTS",0 );
|
||||||
if ( wsMotifHints != None )
|
if ( wsMotifHints != None )
|
||||||
{
|
{
|
||||||
|
@ -118,17 +117,6 @@ void wsWindowDecoration( wsTWindow * win,long d )
|
||||||
XChangeProperty( wsDisplay,win->WindowID,wsMotifHints,wsMotifHints,32,
|
XChangeProperty( wsDisplay,win->WindowID,wsMotifHints,wsMotifHints,32,
|
||||||
PropModeReplace,(unsigned char *)&wsMotifWmHints,5 );
|
PropModeReplace,(unsigned char *)&wsMotifWmHints,5 );
|
||||||
}
|
}
|
||||||
//XMapWindow( wsDisplay,win->WindowID );
|
|
||||||
// if ( d )
|
|
||||||
// {
|
|
||||||
// win->SizeHint.win_gravity=ForgetGravity;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// win->SizeHint.win_gravity=StaticGravity;
|
|
||||||
// }
|
|
||||||
// win->SizeHint.flags=PWinGravity;
|
|
||||||
// XSetWMSizeHints( wsDisplay,win->WindowID,&win->SizeHint,win->AtomWMSizeHint );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------
|
||||||
|
@ -856,20 +844,24 @@ void wsPutImage( wsTWindow * win )
|
||||||
// ----------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------
|
||||||
// Move window to x, y.
|
// Move window to x, y.
|
||||||
// ----------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------
|
||||||
void wsMoveWindow( wsTWindow * win,int x, int y )
|
void wsMoveWindow( wsTWindow * win,int b,int x, int y )
|
||||||
{
|
{
|
||||||
switch ( x )
|
if ( b )
|
||||||
{
|
{
|
||||||
case -1: win->X=( wsMaxX / 2 ) - ( win->Width / 2 ); break;
|
switch ( x )
|
||||||
case -2: win->X=wsMaxX - win->Width; break;
|
{
|
||||||
default: win->X=x; break;
|
case -1: win->X=( wsMaxX / 2 ) - ( win->Width / 2 ); break;
|
||||||
}
|
case -2: win->X=wsMaxX - win->Width; break;
|
||||||
switch ( y )
|
default: win->X=x; break;
|
||||||
{
|
}
|
||||||
case -1: win->Y=( wsMaxY / 2 ) - ( win->Height / 2 ); break;
|
switch ( y )
|
||||||
case -2: win->Y=wsMaxY - win->Height; break;
|
{
|
||||||
default: win->Y=y; break;
|
case -1: win->Y=( wsMaxY / 2 ) - ( win->Height / 2 ); break;
|
||||||
|
case -2: win->Y=wsMaxY - win->Height; break;
|
||||||
|
default: win->Y=y; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else { win->X=x; win->Y=y; }
|
||||||
|
|
||||||
win->SizeHint.flags=PPosition | PWinGravity;
|
win->SizeHint.flags=PPosition | PWinGravity;
|
||||||
win->SizeHint.x=win->X;
|
win->SizeHint.x=win->X;
|
||||||
|
|
|
@ -203,7 +203,7 @@ extern void wsMainLoop( void );
|
||||||
// ----------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------
|
||||||
extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label );
|
extern void wsCreateWindow( wsTWindow * win,int X,int Y,int wX,int hY,int bW,int cV,unsigned char D,char * label );
|
||||||
extern void wsDestroyWindow( wsTWindow * win );
|
extern void wsDestroyWindow( wsTWindow * win );
|
||||||
extern void wsMoveWindow( wsTWindow * win,int x, int y );
|
extern void wsMoveWindow( wsTWindow * win,int b,int x, int y );
|
||||||
extern void wsResizeWindow( wsTWindow * win,int sx, int sy );
|
extern void wsResizeWindow( wsTWindow * win,int sx, int sy );
|
||||||
extern void wsIconify( wsTWindow win );
|
extern void wsIconify( wsTWindow win );
|
||||||
extern void wsMoveTopWindow( wsTWindow * win );
|
extern void wsMoveTopWindow( wsTWindow * win );
|
||||||
|
|
|
@ -1018,6 +1018,7 @@ current_module="init_libvo";
|
||||||
moviewidth=screen_size_x=sh_video->disp_w;
|
moviewidth=screen_size_x=sh_video->disp_w;
|
||||||
movieheight=screen_size_y=sh_video->disp_h;
|
movieheight=screen_size_y=sh_video->disp_h;
|
||||||
mplShMem->StreamType=stream->type;
|
mplShMem->StreamType=stream->type;
|
||||||
|
mplSetFileName( filename );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1893,7 +1894,7 @@ if(use_gui || ++curr_filename<num_filenames){
|
||||||
|
|
||||||
video_out=NULL;
|
video_out=NULL;
|
||||||
audio_out=NULL;
|
audio_out=NULL;
|
||||||
|
|
||||||
goto play_next_file;
|
goto play_next_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue