changeset 27306:7a650839fc10

Enable runtime border/window decorations-toggling for Linux gl and gl2 vos.
author reimar
date Tue, 22 Jul 2008 18:46:07 +0000
parents b20d1786f838
children b9af28b39daf
files libvo/gl_common.h libvo/vo_gl.c libvo/vo_gl2.c libvo/x11_common.c libvo/x11_common.h
diffstat 5 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/gl_common.h	Tue Jul 22 18:40:01 2008 +0000
+++ b/libvo/gl_common.h	Tue Jul 22 18:46:07 2008 +0000
@@ -293,6 +293,7 @@
 /** \} */
 
 #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 @@
 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()
--- a/libvo/vo_gl.c	Tue Jul 22 18:40:01 2008 +0000
+++ b/libvo/vo_gl.c	Tue Jul 22 18:46:07 2008 +0000
@@ -999,12 +999,10 @@
     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;
--- a/libvo/vo_gl2.c	Tue Jul 22 18:40:01 2008 +0000
+++ b/libvo/vo_gl2.c	Tue Jul 22 18:46:07 2008 +0000
@@ -889,11 +889,9 @@
         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:
--- a/libvo/x11_common.c	Tue Jul 22 18:40:01 2008 +0000
+++ b/libvo/x11_common.c	Tue Jul 22 18:46:07 2008 +0000
@@ -1588,6 +1588,12 @@
     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
  */
--- a/libvo/x11_common.h	Tue Jul 22 18:40:01 2008 +0000
+++ b/libvo/x11_common.h	Tue Jul 22 18:46:07 2008 +0000
@@ -61,6 +61,7 @@
 	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