[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.120,1.121
Zoltan Ponekker
pontscho at mplayerhq.hu
Thu Oct 17 00:29:18 CEST 2002
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv2338/libvo
Modified Files:
vo_x11.c
Log Message:
-fixed-vo support
Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- vo_x11.c 9 Oct 2002 22:44:07 -0000 1.120
+++ vo_x11.c 16 Oct 2002 22:29:00 -0000 1.121
@@ -49,7 +49,7 @@
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 @@
else
#endif
{
- if(vo_window != None) {
- freeMyXImage();
- XUnmapWindow( mDisplay,vo_window );
- XDestroyWindow(mDisplay, vo_window);
- }
-
#ifdef HAVE_XF86VM
if ( vm )
{
@@ -325,24 +319,27 @@
}
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 @@
}
vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
+
+ if ( myximage ) freeMyXImage();
getMyXImage();
if ( !WinID )
More information about the MPlayer-cvslog
mailing list