summaryrefslogtreecommitdiffstats
path: root/video/out/gl_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-02 17:08:05 +0100
committerwm4 <wm4@nowhere>2013-03-03 15:36:56 +0100
commit9efe32120b4d5aaa88eccf4767fa7d7c5c700fd1 (patch)
tree2be16d7b556409a1ad5e680b2dc6b73ba2b3d868 /video/out/gl_common.c
parentba35335939c46a1ed53584c2b850c7deecbf837a (diff)
downloadmpv-9efe32120b4d5aaa88eccf4767fa7d7c5c700fd1.tar.bz2
mpv-9efe32120b4d5aaa88eccf4767fa7d7c5c700fd1.tar.xz
vo_opengl: don't destroy VOFLAG_HIDDEN window
This was done so because the X11 code had a hard to track down issue with some window managers, and caused the VO window to be placed incorrectly. This was fixed in the previous commit. Consequently, we can remove this bad hack.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r--video/out/gl_common.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c
index c416f20900..1f7b51de5b 100644
--- a/video/out/gl_common.c
+++ b/video/out/gl_common.c
@@ -1599,7 +1599,6 @@ MPGLContext *mpgl_init(enum MPGLType type, struct vo *vo)
.gl = talloc_zero(ctx, GL),
.type = type,
.vo = vo,
- .vo_init_ok = true,
};
switch (ctx->type) {
#ifdef CONFIG_GL_COCOA
@@ -1669,23 +1668,9 @@ MPGLContext *mpgl_init(enum MPGLType type, struct vo *vo)
return NULL;
}
-bool mpgl_destroy_window(struct MPGLContext *ctx)
-{
- ctx->releaseGlContext(ctx);
- *ctx->gl = (GL) {0};
- // This is a caveat. At least on X11, this will recreate the X display
- // connection. Also, if vo_init() fails, unspecified things will happen.
- ctx->vo_uninit(ctx->vo);
- ctx->vo_init_ok = ctx->vo_init(ctx->vo);
- return ctx->vo_init_ok;
-}
-
bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, uint32_t d_width,
uint32_t d_height, uint32_t flags)
{
- if (!ctx->vo_init_ok)
- return false;
-
gl_caps |= MPGL_CAP_GL;
ctx->requested_gl_version = (gl_caps & MPGL_CAP_GL_LEGACY)
@@ -1710,9 +1695,7 @@ bool mpgl_config_window(struct MPGLContext *ctx, int gl_caps, uint32_t d_width,
void mpgl_uninit(MPGLContext *ctx)
{
- if (!ctx)
- return;
- if (ctx->vo_init_ok) {
+ if (ctx) {
ctx->releaseGlContext(ctx);
ctx->vo_uninit(ctx->vo);
}