# HG changeset patch # User reimar # Date 1375721336 0 # Node ID a3a1ad19b8b473257ed4ebae2bfbc971eb0d2c7b # Parent 97638800c6f3623b196916d73f0d3cc59f3862b4 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. diff -r 97638800c6f3 -r a3a1ad19b8b4 libvo/vo_gl.c --- a/libvo/vo_gl.c Mon Aug 05 06:46:41 2013 +0000 +++ b/libvo/vo_gl.c Mon Aug 05 16:48:56 2013 +0000 @@ -1366,7 +1366,10 @@ 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; } diff -r 97638800c6f3 -r a3a1ad19b8b4 libvo/x11_common.c --- a/libvo/x11_common.c Mon Aug 05 06:46:41 2013 +0000 +++ b/libvo/x11_common.c Mon Aug 05 16:48:56 2013 +0000 @@ -1100,6 +1100,16 @@ 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 @@ 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));