[MPlayer-cvslog] r27338 - in trunk/libvo: gl_common.h vo_gl.c vo_gl2.c x11_common.c x11_common.h

reimar subversion at mplayerhq.hu
Tue Jul 22 20:46:08 CEST 2008


Author: reimar
Date: Tue Jul 22 20:46:07 2008
New Revision: 27338

Log:
Enable runtime border/window decorations-toggling for Linux gl and gl2 vos.


Modified:
   trunk/libvo/gl_common.h
   trunk/libvo/vo_gl.c
   trunk/libvo/vo_gl2.c
   trunk/libvo/x11_common.c
   trunk/libvo/x11_common.h

Modified: trunk/libvo/gl_common.h
==============================================================================
--- trunk/libvo/gl_common.h	(original)
+++ trunk/libvo/gl_common.h	Tue Jul 22 20:46:07 2008
@@ -293,6 +293,7 @@ void glDisableYUVConversion(GLenum targe
 /** \} */
 
 #ifdef GL_WIN32
+#define vo_border() vo_w32_border()
 #define vo_check_events() vo_w32_check_events()
 #define vo_fullscreen() vo_w32_fullscreen()
 #define vo_ontop() vo_w32_ontop()
@@ -300,6 +301,7 @@ void glDisableYUVConversion(GLenum targe
 int setGlWindow(int *vinfo, HGLRC *context, HWND win);
 void releaseGlContext(int *vinfo, HGLRC *context);
 #else
+#define vo_border() vo_x11_border()
 #define vo_check_events() vo_x11_check_events(mDisplay)
 #define vo_fullscreen() vo_x11_fullscreen()
 #define vo_ontop() vo_x11_ontop()

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	(original)
+++ trunk/libvo/vo_gl.c	Tue Jul 22 20:46:07 2008
@@ -999,12 +999,10 @@ static int control(uint32_t request, voi
     vo_fullscreen();
     resize(vo_dwidth, vo_dheight);
     return VO_TRUE;
-#ifdef GL_WIN32
   case VOCTRL_BORDER:
-    vo_w32_border();
+    vo_border();
     resize(vo_dwidth, vo_dheight);
     return VO_TRUE;
-#endif
   case VOCTRL_GET_PANSCAN:
     if (!use_aspect) return VO_NOTIMPL;
     return VO_TRUE;

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	(original)
+++ trunk/libvo/vo_gl2.c	Tue Jul 22 20:46:07 2008
@@ -889,11 +889,9 @@ static int control(uint32_t request, voi
         initGl(vo_dwidth, vo_dheight);
       resize(&vo_dwidth, &vo_dheight);
       return VO_TRUE;
-#ifdef GL_WIN32
     case VOCTRL_BORDER:
-      vo_w32_border();
+      vo_border();
       return VO_TRUE;
-#endif
     case VOCTRL_GET_PANSCAN:
       return VO_TRUE;
     case VOCTRL_SET_PANSCAN:

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	(original)
+++ trunk/libvo/x11_common.c	Tue Jul 22 20:46:07 2008
@@ -1588,6 +1588,12 @@ void vo_x11_ontop(void)
     vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
 }
 
+void vo_x11_border(void)
+{
+    vo_border = !vo_border;
+    vo_x11_decoration(mDisplay, vo_window, vo_border && !vo_fs);
+}
+
 /*
  * XScreensaver stuff
  */

Modified: trunk/libvo/x11_common.h
==============================================================================
--- trunk/libvo/x11_common.h	(original)
+++ trunk/libvo/x11_common.h	Tue Jul 22 20:46:07 2008
@@ -61,6 +61,7 @@ extern void vo_x11_clearwindow_part(Disp
 	int img_width, int img_height, int use_fs);
 extern void vo_x11_clearwindow( Display *mDisplay, Window vo_window );
 extern void vo_x11_ontop(void);
+extern void vo_x11_border(void);
 extern void vo_x11_ewmh_fullscreen( int action );
 
 #endif



More information about the MPlayer-cvslog mailing list