# HG changeset patch # User pontscho # Date 1020889475 0 # Node ID be9cd7d845c2f12ad8c544420efc339369edc62d # Parent 04fe086ae48668ce8acec0d6caf3ac67f5f87a08 -zoom, -fs with x[11|mga|v] fix -- round two diff -r 04fe086ae486 -r be9cd7d845c2 libvo/vo_x11.c --- a/libvo/vo_x11.c Wed May 08 19:21:36 2002 +0000 +++ b/libvo/vo_x11.c Wed May 08 20:24:35 2002 +0000 @@ -296,8 +296,8 @@ // hint.width=d_width; // hint.height=d_height; // }else{ -// hint.width=width; -// hint.height=height; + hint.width=width; + hint.height=height; // } #ifdef HAVE_XF86VM diff -r 04fe086ae486 -r be9cd7d845c2 libvo/vo_xmga.c --- a/libvo/vo_xmga.c Wed May 08 19:21:36 2002 +0000 +++ b/libvo/vo_xmga.c Wed May 08 20:24:35 2002 +0000 @@ -195,6 +195,9 @@ unsigned long xswamask; + if ( X_already_started ) return -1; + if (!vo_init()) return -1; + width+=width&1; switch(format) @@ -221,10 +224,6 @@ default: printf("mga: invalid output format %0X\n",format); return (-1); } - if ( X_already_started ) return -1; - - if (!vo_init()) return -1; - aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); aspect_save_screenres(vo_screenwidth,vo_screenheight); @@ -234,9 +233,6 @@ wndX=0; wndY=0; vo_dwidth=d_width; vo_dheight=d_height; vo_mouse_autohide=1; -// vo_fs=fullscreen&1; -// if ( vo_fs ) -// { vo_old_width=d_width; vo_old_height=d_height; } switch ( vo_depthonscreen ) { @@ -249,7 +245,7 @@ inited=1; - aspect(&vo_dwidth,&vo_dheight,A_NOZOOM); + aspect(&vo_dwidth,&vo_dheight,A_NOZOOM); #ifdef HAVE_NEW_GUI if(use_gui) @@ -257,14 +253,9 @@ else #endif { - if ( vo_fs ) - { -// vo_dwidth=vo_screenwidth; -// vo_dheight=vo_screenheight; #ifdef X11_FULLSCREEN - aspect(&dwidth,&dheight,A_ZOOM); + if ( fullscreen&1 ) aspect(&dwidth,&dheight,A_ZOOM); #endif - } XGetWindowAttributes( mDisplay,DefaultRootWindow( mDisplay ),&attribs ); mDepth=attribs.depth; @@ -282,7 +273,7 @@ XUnmapWindow( mDisplay,vo_window ); XChangeWindowAttributes( mDisplay,vo_window,xswamask,&xWAttribs); } else - vo_window=XCreateWindow( mDisplay,RootWindow( mDisplay,mScreen ), + vo_window=XCreateWindow( mDisplay,mRootWin, wndX,wndY, vo_dwidth,vo_dheight, xWAttribs.border_pixel, diff -r 04fe086ae486 -r be9cd7d845c2 libvo/vo_xv.c --- a/libvo/vo_xv.c Wed May 08 19:21:36 2002 +0000 +++ b/libvo/vo_xv.c Wed May 08 20:24:35 2002 +0000 @@ -786,6 +786,8 @@ static void uninit(void) { int i; +#if 0 + if(!mDisplay) return; saver_on(mDisplay); // screen saver back on if(vo_config_count) for( i=0;i 0)) - XDestroyWindow(display, window); - vo_depthonscreen = 0; + if (WinID < 0) + { + XUnmapWindow( display,window ); + XDestroyWindow(display, window); + } vo_fs=0; } return(1); @@ -724,11 +727,8 @@ switch ( vo_wm_type ) { -// case vo_wm_WMakerStyle: -// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 ); - break; case vo_wm_Unknown: -// vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 ); + vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 1 : 0 ); XUnmapWindow( mDisplay,vo_window ); break; case vo_wm_IceWM: diff -r 04fe086ae486 -r be9cd7d845c2 mplayer.c --- a/mplayer.c Wed May 08 19:21:36 2002 +0000 +++ b/mplayer.c Wed May 08 20:24:35 2002 +0000 @@ -355,6 +355,9 @@ uninit_player(INITED_ALL); #ifdef X11_FULLSCREEN +#ifdef HAVE_NEW_GUI + if ( !use_gui ) +#endif vo_uninit(); // close the X11 connection (if any opened) #endif