summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-08 20:24:35 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-08 20:24:35 +0000
commit5a26c56aade3af88923779a0343a1d6a5b00c0db (patch)
treeda2b653d8d9b0e9cfb370d012250f8ac825e7ede /libvo
parentb5322c7eb861d3dc67c4ec39f350d763b266fb84 (diff)
downloadmpv-5a26c56aade3af88923779a0343a1d6a5b00c0db.tar.bz2
mpv-5a26c56aade3af88923779a0343a1d6a5b00c0db.tar.xz
-zoom, -fs with x[11|mga|v] fix -- round two
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6017 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c4
-rw-r--r--libvo/vo_xmga.c21
-rw-r--r--libvo/vo_xv.c15
-rw-r--r--libvo/vo_xvidix.c1
-rw-r--r--libvo/x11_common.c18
5 files changed, 33 insertions, 26 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 2a346e4da7..7b2b25768e 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -296,8 +296,8 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
// 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 --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c
index 59982150d0..476fffd7ab 100644
--- a/libvo/vo_xmga.c
+++ b/libvo/vo_xmga.c
@@ -195,6 +195,9 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
unsigned long xswamask;
+ if ( X_already_started ) return -1;
+ if (!vo_init()) return -1;
+
width+=width&1;
switch(format)
@@ -221,10 +224,6 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
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 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
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 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
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 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
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 @@ static uint32_t config( uint32_t width, uint32_t height, uint32_t d_width, uint3
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 --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 5bfb1ed635..b5af2836db 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -786,6 +786,8 @@ return 0;
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 );
@@ -793,11 +795,24 @@ static void uninit(void)
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);
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 98ea87b486..4bf01a5b81 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -437,6 +437,7 @@ static void uninit(void)
static uint32_t preinit(const char *arg)
{
+
if (arg)
vidix_name = strdup(arg);
else
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index d5cb3bfa7d..546dae4f35 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -358,9 +358,11 @@ int vo_init( void )
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 @@ XSizeHints vo_hint;
int vo_x11_uninit(Display *display, Window window)
{
- XSetErrorHandler(NULL);
vo_showcursor( display,window );
#ifdef HAVE_NEW_GUI
@@ -518,9 +519,11 @@ int vo_x11_uninit(Display *display, Window window)
#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 @@ void vo_x11_fullscreen( void )
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: