[Mplayer-cvslog] CVS: main/libvo vo_gl2.c,1.23,1.24

Zoltan Ponekker pontscho at mplayerhq.hu
Wed Oct 16 23:32:21 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv2667/libvo

Modified Files:
	vo_gl2.c 
Log Message:
-fixed-vo support

Index: vo_gl2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_gl2.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vo_gl2.c	28 Aug 2002 21:32:32 -0000	1.23
+++ vo_gl2.c	16 Oct 2002 21:32:03 -0000	1.24
@@ -669,13 +669,9 @@
 	xswa.colormap         = XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone);
 	xswamask = CWBackPixel | CWBorderPixel | CWColormap;
 
-  vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen),
-    hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa);
-
-  vo_x11_classhint( mDisplay,vo_window,"gl2" );
-  vo_hidecursor(mDisplay,vo_window);
-
-  wsGLXContext=glXCreateContext( mDisplay,vinfo,NULL,True );
+  if ( vo_window == None ) 
+   {
+    vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen), hint.x, hint.y, hint.width, hint.height, 4, vinfo->depth,CopyFromParent,vinfo->visual,xswamask,&xswa);
 
   if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 );
 
@@ -686,7 +682,6 @@
 	XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
 
 	/* Map window. */
-
 	XMapWindow(mDisplay, vo_window);
 #ifdef HAVE_XINERAMA
 	vo_x11_xinerama_move(mDisplay,vo_window);
@@ -702,7 +697,17 @@
 
 	XSelectInput(mDisplay, vo_window, NoEventMask);
 
-  glXMakeCurrent( mDisplay,vo_window,wsGLXContext );
+   }
+   else if ( !(flags&1) ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
+
+  vo_x11_classhint( mDisplay,vo_window,"gl2" );
+  vo_hidecursor(mDisplay,vo_window);
+  
+  if ( vo_config_count ) glXDestroyContext( mDisplay,wsGLXContext );
+
+  wsGLXContext=glXCreateContext( mDisplay,vinfo,NULL,True );
+
+        glXMakeCurrent( mDisplay,vo_window,wsGLXContext );
 
 	XFlush(mDisplay);
 	XSync(mDisplay, False);




More information about the MPlayer-cvslog mailing list