diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-04 22:08:23 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-02-04 22:08:23 +0000 |
commit | f34454b6b5acba9c21dcc98d9b7d877731aa98cf (patch) | |
tree | a2b37c0232bdb2951201142d061f2183080dfadf /libvo | |
parent | ee9b73f20cb824feb440e51b2ec814e7ce4bb76a (diff) |
Create the OpenGL probe window as a hidden Window on X11.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30507 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/video_out.h | 1 | ||||
-rw-r--r-- | libvo/vo_gl.c | 2 | ||||
-rw-r--r-- | libvo/x11_common.c | 10 |
3 files changed, 10 insertions, 3 deletions
diff --git a/libvo/video_out.h b/libvo/video_out.h index b9380fadf1..1fce2c2877 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -108,6 +108,7 @@ typedef struct { #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 --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 5219b06cab..066ad5b71b 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -1167,7 +1167,7 @@ static int preinit(const char *arg) 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 --git a/libvo/x11_common.c b/libvo/x11_common.c index 871ab62940..bb46588ea4 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -104,6 +104,7 @@ int mLocalDisplay; 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 @@ void vo_x11_create_vo_window(XVisualInfo *vis, int x, int y, 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); |