# HG changeset patch # User reimar # Date 1265321303 0 # Node ID 3422423f2e204c37163f5facc24ab94651418fad # Parent 33d58a8eaf09fd0fbd90afbca98cb6b688f848a0 Create the OpenGL probe window as a hidden Window on X11. diff -r 33d58a8eaf09 -r 3422423f2e20 libvo/video_out.h --- a/libvo/video_out.h Thu Feb 04 21:20:47 2010 +0000 +++ b/libvo/video_out.h Thu Feb 04 22:08:23 2010 +0000 @@ -108,6 +108,7 @@ #define VOFLAG_MODESWITCHING 0x02 #define VOFLAG_SWSCALE 0x04 #define VOFLAG_FLIPPING 0x08 +#define VOFLAG_HIDDEN 0x10 //< Use to create a hidden window #define VOFLAG_XOVERLAY_SUB_VO 0x10000 typedef struct vo_info_s diff -r 33d58a8eaf09 -r 3422423f2e20 libvo/vo_gl.c --- a/libvo/vo_gl.c Thu Feb 04 21:20:47 2010 +0000 +++ b/libvo/vo_gl.c Thu Feb 04 22:08:23 2010 +0000 @@ -1167,7 +1167,7 @@ if (!init_mpglcontext(&glctx, gltype)) goto err_out; if (use_yuv == -1) { - if (create_window(320, 200, 0, NULL) < 0) + if (create_window(320, 200, VOFLAG_HIDDEN, NULL) < 0) goto err_out; if (glctx.setGlWindow(&glctx) == SET_WINDOW_FAILED) goto err_out; diff -r 33d58a8eaf09 -r 3422423f2e20 libvo/x11_common.c --- a/libvo/x11_common.c Thu Feb 04 21:20:47 2010 +0000 +++ b/libvo/x11_common.c Thu Feb 04 22:08:23 2010 +0000 @@ -104,6 +104,7 @@ int vo_mouse_autohide = 0; int vo_wm_type = 0; int vo_fs_type = 0; // needs to be accessible for GUI X11 code +static int window_state; static int vo_fs_flip = 0; char **vo_fstype_list; @@ -1102,13 +1103,18 @@ goto final; } if (vo_window == None) { - XSizeHints hint; - XEvent xev; vo_fs = 0; vo_dwidth = width; vo_dheight = height; vo_window = vo_x11_create_smooth_window(mDisplay, mRootWin, vis->visual, x, y, width, height, vis->depth, col_map); + window_state = VOFLAG_HIDDEN; + } + if (flags & VOFLAG_HIDDEN) + goto final; + if (window_state & VOFLAG_HIDDEN) { + XSizeHints hint; + XEvent xev; vo_x11_classhint(mDisplay, vo_window, classname); XStoreName(mDisplay, vo_window, title); vo_hidecursor(mDisplay, vo_window);