diff --git a/Gui/mplayer/gtk/fs.c b/Gui/mplayer/gtk/fs.c index 2a01385ca6..9eb60ac3d7 100644 --- a/Gui/mplayer/gtk/fs.c +++ b/Gui/mplayer/gtk/fs.c @@ -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 diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c index ec7791cc38..9978328f3e 100644 --- a/Gui/mplayer/play.c +++ b/Gui/mplayer/play.c @@ -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 ); diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index ea8551e3e6..e221c78e8e 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -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; diff --git a/Gui/wm/ws.h b/Gui/wm/ws.h index aea0bc01d6..19e7a3ecbf 100644 --- a/Gui/wm/ws.h +++ b/Gui/wm/ws.h @@ -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 diff --git a/Gui/wm/wskeys.h b/Gui/wm/wskeys.h index baa2732c16..40ef8de363 100644 --- a/Gui/wm/wskeys.h +++ b/Gui/wm/wskeys.h @@ -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 { diff --git a/Gui/wm/wsmkeys.h b/Gui/wm/wsmkeys.h index 23f4477565..ae2b5d1d93 100644 --- a/Gui/wm/wsmkeys.h +++ b/Gui/wm/wsmkeys.h @@ -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" }, diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 5b09716ae4..121e95c8c3 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -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" );