[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.100,1.101 vo_xmga.c,1.65,1.66 vo_xv.c,1.84,1.85 vo_xvidix.c,1.33,1.34 x11_common.c,1.75,1.76
Zoltan Ponekker
pontscho at mplayerhq.hu
Wed May 8 22:24:37 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv28522/libvo
Modified Files:
vo_x11.c vo_xmga.c vo_xv.c vo_xvidix.c x11_common.c
Log Message:
-zoom, -fs with x[11|mga|v] fix -- round two
Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- vo_x11.c 8 May 2002 16:41:44 -0000 1.100
+++ vo_x11.c 8 May 2002 20:24:35 -0000 1.101
@@ -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
Index: vo_xmga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xmga.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- vo_xmga.c 7 May 2002 13:31:29 -0000 1.65
+++ vo_xmga.c 8 May 2002 20:24:35 -0000 1.66
@@ -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,
Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- vo_xv.c 7 May 2002 13:31:29 -0000 1.84
+++ vo_xv.c 8 May 2002 20:24:35 -0000 1.85
@@ -785,6 +785,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<num_buffers;i++ ) deallocate_xvimage( i );
@@ -792,11 +794,24 @@
vo_vm_close(mDisplay);
#endif
if(vo_config_count) vo_x11_uninit(mDisplay, vo_window);
+
+#else
+
+ if ( !vo_config_count ) return;
+ saver_on(mDisplay); // screen saver back on
+ for( i=0;i<num_buffers;i++ ) deallocate_xvimage( i );
+#ifdef HAVE_XF86VM
+ vo_vm_close(mDisplay);
+#endif
+ vo_x11_uninit(mDisplay, vo_window);
+
+#endif
}
static uint32_t preinit(const char *arg)
{
XvPortID xv_p;
+
if(arg)
{
mp_msg(MSGT_VO,MSGL_ERR,"vo_xv: Unknown subdevice: %s\n",arg);
Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- vo_xvidix.c 7 May 2002 13:31:29 -0000 1.33
+++ vo_xvidix.c 8 May 2002 20:24:35 -0000 1.34
@@ -437,6 +437,7 @@
static uint32_t preinit(const char *arg)
{
+
if (arg)
vidix_name = strdup(arg);
else
Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- x11_common.c 8 May 2002 16:41:44 -0000 1.75
+++ x11_common.c 8 May 2002 20:24:35 -0000 1.76
@@ -358,9 +358,11 @@
void vo_uninit( void )
{
- printf("vo: uninit ...\n" );
if( !vo_depthonscreen ) return;
+ printf("vo: uninit ...\n" );
+ XSetErrorHandler(NULL);
XCloseDisplay( mDisplay );
+ vo_depthonscreen = 0;
}
#include "../linux/keycodes.h"
@@ -509,7 +511,6 @@
int vo_x11_uninit(Display *display, Window window)
{
- XSetErrorHandler(NULL);
vo_showcursor( display,window );
#ifdef HAVE_NEW_GUI
@@ -518,9 +519,11 @@
#endif
{
/* and -wid is set */
- if (!(WinID > 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:
More information about the MPlayer-cvslog
mailing list