[MPlayer-cvslog] r36403 - in trunk/libvo: vo_gl.c x11_common.c
reimar
subversion at mplayerhq.hu
Mon Aug 5 18:48:57 CEST 2013
Author: reimar
Date: Mon Aug 5 18:48:56 2013
New Revision: 36403
Log:
On X11 use root window as "hidden" window instead of
an unmaped window.
Creating an unmaped window has ugly side-effects like
the window still appearing for a short time and -geometry
not working with some window managers.
Since creating a GL context for the root window might not
work also add fallback behaviour.
Modified:
trunk/libvo/vo_gl.c
trunk/libvo/x11_common.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c Mon Aug 5 08:46:41 2013 (r36402)
+++ trunk/libvo/vo_gl.c Mon Aug 5 18:48:56 2013 (r36403)
@@ -1366,7 +1366,10 @@ static int preinit_internal(const char *
if (!allow_sw && isSoftwareGl())
goto err_out;
autodetectGlExtensions();
- } else if (use_ycbcr == -1) {
+ }
+ if (use_yuv == -1)
+ use_yuv = glctx.type == GLTYPE_EGL_X11 || glctx.type == GLTYPE_EGL_ANDROID ? YUV_CONVERSION_SL_PROGRAM : YUV_CONVERSION_FRAGMENT_LOOKUP; // mostly sensible fallback
+ if (use_ycbcr == -1) {
// rare feature, not worth creating a window to detect
use_ycbcr = 0;
}
Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c Mon Aug 5 08:46:41 2013 (r36402)
+++ trunk/libvo/x11_common.c Mon Aug 5 18:48:56 2013 (r36403)
@@ -1100,6 +1100,16 @@ void vo_x11_create_vo_window(XVisualInfo
Colormap col_map,
const char *classname, const char *title)
{
+ if (flags & VOFLAG_HIDDEN) {
+ // unmapped windows cause lots of issues, in particular
+ // -geometry might be ignore when finally mapping them etc.
+ if (vo_window == None)
+ vo_window = mRootWin;
+ window_state = VOFLAG_HIDDEN;
+ goto final;
+ } else if (vo_window == mRootWin && (window_state & VOFLAG_HIDDEN)) {
+ vo_window = None;
+ }
if (vo_wintitle)
title = vo_wintitle;
if (WinID >= 0) {
@@ -1138,8 +1148,6 @@ void vo_x11_create_vo_window(XVisualInfo
x, y, width, height, vis->depth, col_map);
window_state = VOFLAG_HIDDEN;
}
- if (flags & VOFLAG_HIDDEN)
- goto final;
XStoreName(mDisplay, vo_window, title);
XChangeProperty(mDisplay, vo_window, XA_NET_WM_NAME, XAUTF8_STRING,
8, PropModeReplace, title, strlen(title));
More information about the MPlayer-cvslog
mailing list