1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00

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
This commit is contained in:
reimar 2010-02-04 22:08:23 +00:00
parent ee9b73f20c
commit f34454b6b5
3 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);