summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-22 18:46:07 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-07-22 18:46:07 +0000
commit983800b76f02482213c60f3a9d8604f9719a465e (patch)
tree6790310e760f62c5a41b80378d849635589a3867 /libvo
parentb9d2214eeeafb1cd829916ad41212af0d3ee7ebe (diff)
downloadmpv-983800b76f02482213c60f3a9d8604f9719a465e.tar.bz2
mpv-983800b76f02482213c60f3a9d8604f9719a465e.tar.xz
Enable runtime border/window decorations-toggling for Linux gl and gl2 vos.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27338 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.h2
-rw-r--r--libvo/vo_gl.c4
-rw-r--r--libvo/vo_gl2.c4
-rw-r--r--libvo/x11_common.c6
-rw-r--r--libvo/x11_common.h1
5 files changed, 11 insertions, 6 deletions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index 1c106dd5b5..6df60ce257 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -293,6 +293,7 @@ void glDisableYUVConversion(GLenum target, int type);
/** \} */
#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 target, int type);
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()
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 623a5aaefa..dfe52707b3 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -999,12 +999,10 @@ static int control(uint32_t request, void *data, ...)
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;
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 70a89c8591..89af47751f 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -889,11 +889,9 @@ static int control(uint32_t request, void *data, ...)
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:
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index a02303c60b..4a78b25b04 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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
*/
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index 2c52eb3163..1a4c3ba018 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -61,6 +61,7 @@ extern void vo_x11_clearwindow_part(Display *mDisplay, Window vo_window,
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