1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

small fixes

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6090 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2002-05-14 11:41:02 +00:00
parent 8852e42fc7
commit 1932ce4014
7 changed files with 41 additions and 19 deletions

View File

@ -40,7 +40,7 @@ int fsType = 0;
#define fsNumberOfVideoFilterNames 9
char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] =
{ { "MPEG files (*.mpg)", "*.mpg" },
{ { "MPEG files (*.mpg,*.mpeg)", "*.mpg,*.mpeg" },
{ "VOB files (*.vob)", "*.vob" },
{ "AVI files (*.avi)", "*.avi" },
{ "QT files (*.mov)", "*.mov" },
@ -48,7 +48,7 @@ char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] =
{ "VIVO files (*.viv)", "*.viv" },
{ "Windows Media Video (*.wmv)", "*.wmv" },
{ "Audio files (*.mp2,*.mp3,*.wma)", "*.mp2,*.mp3,*.wma" },
{ "Video files (*.mpg,*.vob,*.avi,*.mov,*.asf,*.viv,*.wmv)", "*.mpg,*.vob,*.avi,*.mov,*.asf,*.viv,*.wmv" },
{ "Video files (*.mpg,*.mpeg,*.vob,*.avi,*.mov,*.asf,*.viv,*.wmv)", "*.mpg,*.mpeg,*.vob,*.avi,*.mov,*.asf,*.viv,*.wmv" },
{ "All files (*)", "*" } };
#define fsNumberOfSubtitleFilterNames 9

View File

@ -181,7 +181,6 @@ void ChangeSkin( char * name )
mainVisible=1;
return;
}
if ( appMPlayer.menuBase.Bitmap.Image )
{
if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
@ -189,6 +188,7 @@ void ChangeSkin( char * name )
{ mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
wsVisibleWindow( &appMPlayer.menuWindow,wsHideWindow );
}
if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );

View File

@ -156,6 +156,7 @@ int wsWindowManagerType( void )
int wm = wsWMUnknown;
// --- gnome
/*
type=XInternAtom( wsDisplay,"_WIN_SUPPORTING_WM_CHECK",False );
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
{
@ -163,7 +164,7 @@ int wsWindowManagerType( void )
XFree( args );
return wsWMGnome;
}
*/
// --- net wm
type=XInternAtom( wsDisplay,"_NET_SUPPORTED",False );
if ( Success == XGetWindowProperty( wsDisplay,wsRootWin,type,0,65536 / sizeof( long ),False,AnyPropertyType,&type,&format,&nitems,&bytesafter,&args ) && nitems > 0 )
@ -198,6 +199,7 @@ int wsWindowManagerType( void )
XFree( name );
}
} while( c++ < 25 );
XUnmapWindow( wsDisplay,win );
XDestroyWindow( wsDisplay,win );
#ifdef MP_DEBUG
if ( wm == wsWMUnknown ) mp_dbg( MSGT_VO,MSGL_STATUS,"[ws] Unknown wm type...\n" );
@ -205,6 +207,8 @@ int wsWindowManagerType( void )
return wsWMUnknown;
}
extern int vo_wm_type;
void wsXInit( void* mDisplay )
{
int eventbase;
@ -256,7 +260,8 @@ if(mDisplay){
wsMaxX=DisplayWidth( wsDisplay,wsScreen );
wsMaxY=DisplayHeight( wsDisplay,wsScreen );
wsWMType=wsWindowManagerType();
if ( vo_wm_type != -1 ) wsWMType=vo_wm_type;
else wsWMType=wsWindowManagerType();
wsGetDepthOnScreen();
#ifdef DEBUG
@ -533,7 +538,6 @@ inline int wsSearch( Window win )
Bool wsEvents( Display * display,XEvent * Event,XPointer arg )
{
KeySym keySym;
unsigned long i = 0;
int l;
int x,y;
@ -613,6 +617,7 @@ keypressed:
if ( Event->xkey.state & ControlMask ) wsWindowList[l]->Control=1;
if ( Event->xkey.state & ShiftMask ) wsWindowList[l]->Shift=1;
if ( Event->xkey.state & LockMask ) wsWindowList[l]->CapsLock=1;
#if 0
keySym=XKeycodeToKeysym( wsDisplay,Event->xkey.keycode,0 );
if ( keySym != NoSymbol )
{
@ -621,6 +626,19 @@ keypressed:
if ( wsWindowList[l]->KeyHandler )
wsWindowList[l]->KeyHandler( Event->xkey.state,i,keySym );
}
#else
{
int key;
char buf[100];
KeySym keySym;
static XComposeStatus stat;
XLookupString( &Event->xkey,buf,sizeof(buf),&keySym,&stat );
key=( (keySym&0xff00) != 0?( (keySym&0x00ff) + 256 ):( keySym ) );
wsKeyTable[ key ]=i;
if ( wsWindowList[l]->KeyHandler ) wsWindowList[l]->KeyHandler( Event->xkey.state,i,key );
}
#endif
break;
case MotionNotify: i=wsMoveMouse; goto buttonreleased;

View File

@ -87,14 +87,11 @@
#define wsPVisible 5
#define wsRolled 6
#define wsWMWMW 0
#define wsWMUnknown 1
#define wsWMNetWM 2
#define wsWMKDE 3
#define wsWMIceWM 4
#define wsWMBlackBox 5
#define wsWMGnome 6
#define wsWMWMaker 7
#define wsWMUnknown 0
#define wsWMNetWM 1
#define wsWMKDE 2
#define wsWMIceWM 3
#define wsWMWMaker 4
#define wsParamDisplay Display *dpy,Window w

View File

@ -6,8 +6,6 @@
#define wsosbrackets '['
#define wscsbrackets ']'
#define wsomore '<'
#define wscmore '>'
#define wsq 'q'
#define wsa 'a'
@ -75,6 +73,12 @@
#define ws9 '9'
#define wsSpace ' '
#define wsMinus '-'
#define wsPlus '+'
#define wsMul '*'
#define wsDiv '/'
#define wsLess '<'
#define wsMore '>'
#define wsUp 0x52 + 256
#define wsDown 0x54 + 256
@ -137,7 +141,7 @@
#define wsXF86Next 0x17 + 256
#define wsXF86Media 0x32 + 256
#define wsKeyNumber 124
#define wsKeyNumber 128
typedef struct
{

View File

@ -34,7 +34,9 @@ TwsKeyNames wsKeyNames[ wsKeyNumber ] =
{ wsEnd, "End" }, { wsEscape, "Escape" },
{ wsosbrackets, "[" }, { wscsbrackets, "]" },
{ wsomore, "<" }, { wscmore, ">" },
{ wsMore, "<" }, { wsLess, ">" },
{ wsMinus, "-" }, { wsPlus, "+" },
{ wsMul, "*" }, { wsDiv, "/" },
{ ws0, "0" }, { ws1, "1" }, { ws2, "2" }, { ws3, "3" }, { ws4, "4" },
{ ws5, "5" }, { ws6, "6" }, { ws7, "7" }, { ws8, "8" }, { ws9, "9" },

View File

@ -68,7 +68,7 @@ int mLocalDisplay;
/* output window id */
int WinID=-1;
int vo_mouse_autohide = 0;
int vo_wm_type = vo_wm_Unknown;
int vo_wm_type = -1;
#ifdef HAVE_XINERAMA
int xinerama_screen = 0;
@ -232,6 +232,7 @@ int vo_wm_detect( void )
}
} while( c++ < 25 );
if ( name ) XFree( name );
XUnmapWindow( mDisplay,win );
XDestroyWindow( mDisplay,win );
#ifdef MP_DEBUG
if ( wm == vo_wm_Unknown ) mp_dbg( MSGT_VO,MSGL_STATUS,"[x11] Unknown wm type...\n" );