summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-16 22:29:00 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-16 22:29:00 +0000
commit898e7af0fb2b382157a55bfd40619e87fa103548 (patch)
tree074c3cca43ada40b04a1a39013e7779f2a1c7f27 /libvo
parent210f7955fbb02723a60864cc38a4436528b544d9 (diff)
downloadmpv-898e7af0fb2b382157a55bfd40619e87fa103548.tar.bz2
mpv-898e7af0fb2b382157a55bfd40619e87fa103548.tar.xz
-fixed-vo support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7765 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 90a9376d47..b1d01f491a 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -49,7 +49,7 @@ static void (*draw_alpha_fnc)(int x0,int y0, int w,int h, unsigned char* src, un
static unsigned char *ImageData;
/* X11 related variables */
-static XImage *myximage;
+static XImage *myximage = NULL;
static int depth,bpp,mode;
static XWindowAttributes attribs;
@@ -275,12 +275,6 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
else
#endif
{
- if(vo_window != None) {
- freeMyXImage();
- XUnmapWindow( mDisplay,vo_window );
- XDestroyWindow(mDisplay, vo_window);
- }
-
#ifdef HAVE_XF86VM
if ( vm )
{
@@ -325,24 +319,27 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
}
else
{
- vo_window=XCreateWindow( mDisplay,mRootWin,
+ if ( vo_window == None )
+ {
+ vo_window=XCreateWindow( mDisplay,mRootWin,
vo_dx,vo_dy,
vo_dwidth,vo_dheight,
xswa.border_pixel,depth,CopyFromParent,vinfo.visual,xswamask,&xswa );
- vo_x11_classhint( mDisplay,vo_window,"x11" );
- vo_hidecursor(mDisplay,vo_window);
- vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 );
- XSelectInput( mDisplay,vo_window,StructureNotifyMask );
- XStoreName( mDisplay,vo_window,title );
- XMapWindow( mDisplay,vo_window );
- if(WinID!=0)
- do { XNextEvent( mDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != vo_window );
-
- if ( fullscreen ) vo_x11_fullscreen();
+ vo_x11_classhint( mDisplay,vo_window,"x11" );
+ vo_hidecursor(mDisplay,vo_window);
+ vo_x11_sizehint( vo_dx,vo_dy,vo_dwidth,vo_dheight,0 );
+ XSelectInput( mDisplay,vo_window,StructureNotifyMask );
+ XStoreName( mDisplay,vo_window,title );
+ XMapWindow( mDisplay,vo_window );
+// if(WinID!=0)
+ do { XNextEvent( mDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != vo_window );
+
+ if ( fullscreen ) vo_x11_fullscreen();
#ifdef HAVE_XINERAMA
- vo_x11_xinerama_move(mDisplay,vo_window);
+ vo_x11_xinerama_move(mDisplay,vo_window);
#endif
+ } else if ( !fullscreen ) XMoveResizeWindow( mDisplay,vo_window,vo_dx,vo_dy,vo_dwidth,vo_dheight );
}
XFlush( mDisplay );
@@ -366,6 +363,8 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
}
vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
+
+ if ( myximage ) freeMyXImage();
getMyXImage();
if ( !WinID )