Mercurial > mplayer.hg
changeset 6089:39c2bfe5c267
small fixes
author | pontscho |
---|---|
date | Tue, 14 May 2002 11:41:02 +0000 |
parents | 99d7f3e033ae |
children | a44bc6314a30 |
files | Gui/mplayer/gtk/fs.c Gui/mplayer/play.c Gui/wm/ws.c Gui/wm/ws.h Gui/wm/wskeys.h Gui/wm/wsmkeys.h libvo/x11_common.c |
diffstat | 7 files changed, 41 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/gtk/fs.c Tue May 14 09:39:13 2002 +0000 +++ b/Gui/mplayer/gtk/fs.c Tue May 14 11:41:02 2002 +0000 @@ -40,7 +40,7 @@ #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 @@ { "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
--- a/Gui/mplayer/play.c Tue May 14 09:39:13 2002 +0000 +++ b/Gui/mplayer/play.c Tue May 14 11:41:02 2002 +0000 @@ -181,7 +181,6 @@ mainVisible=1; return; } - if ( appMPlayer.menuBase.Bitmap.Image ) { if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer ); @@ -189,6 +188,7 @@ { 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 );
--- a/Gui/wm/ws.c Tue May 14 09:39:13 2002 +0000 +++ b/Gui/wm/ws.c Tue May 14 11:41:02 2002 +0000 @@ -156,6 +156,7 @@ 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 @@ 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 @@ 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 @@ return wsWMUnknown; } +extern int vo_wm_type; + void wsXInit( void* mDisplay ) { int eventbase; @@ -256,7 +260,8 @@ 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 @@ Bool wsEvents( Display * display,XEvent * Event,XPointer arg ) { - KeySym keySym; unsigned long i = 0; int l; int x,y; @@ -613,6 +617,7 @@ 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 @@ 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;
--- a/Gui/wm/ws.h Tue May 14 09:39:13 2002 +0000 +++ b/Gui/wm/ws.h Tue May 14 11:41:02 2002 +0000 @@ -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
--- a/Gui/wm/wskeys.h Tue May 14 09:39:13 2002 +0000 +++ b/Gui/wm/wskeys.h Tue May 14 11:41:02 2002 +0000 @@ -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 {
--- a/Gui/wm/wsmkeys.h Tue May 14 09:39:13 2002 +0000 +++ b/Gui/wm/wsmkeys.h Tue May 14 11:41:02 2002 +0000 @@ -34,7 +34,9 @@ { 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" },
--- a/libvo/x11_common.c Tue May 14 09:39:13 2002 +0000 +++ b/libvo/x11_common.c Tue May 14 11:41:02 2002 +0000 @@ -68,7 +68,7 @@ /* 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 @@ } } 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" );