diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-18 18:32:29 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-18 18:32:29 +0000 |
commit | fd0aa2708e00973aa8bc957b97ddc81df34a9c8f (patch) | |
tree | c1984b82633fb93352f59bb838e6a3b62d87d14e /libvo/vo_gl.c | |
parent | 62e993bd964fd89ba111599d46b42ac200c8f8fe (diff) | |
download | mpv-fd0aa2708e00973aa8bc957b97ddc81df34a9c8f.tar.bz2 mpv-fd0aa2708e00973aa8bc957b97ddc81df34a9c8f.tar.xz |
support -wid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15749 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 049c9e4f12..8edaa84859 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -72,6 +72,11 @@ static unsigned int slice_height = 1; static void resize(int x,int y){ mp_msg(MSGT_VO, MSGL_V, "[gl] Resize: %dx%d\n",x,y); + if (WinID >= 0) { + int top = 0, left = 0, w = x, h = y; + geometry(&top, &left, &w, &h, vo_screenwidth, vo_screenheight); + glViewport(top, left, w, h); + } else glViewport( 0, 0, x, y ); glMatrixMode(GL_PROJECTION); @@ -175,11 +180,15 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin vo_dwidth = d_width; vo_dheight= d_height; guiGetEvent(guiSetShVideo, 0); - setGlWindow(&gl_vinfo, &gl_context, vo_window); - initGl(vo_dwidth, vo_dheight); - return 0; + goto glconfig; } #endif + if (WinID >= 0) { + Window win_tmp; + int int_tmp; + vo_window = WinID ? (Window)WinID : mRootWin; + goto glconfig; + } if ( vo_window == None ) { unsigned int fg, bg; XSizeHints hint; @@ -246,6 +255,8 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height); if (vo_fs ^ (flags & VOFLAG_FULLSCREEN)) vo_x11_fullscreen(); + +glconfig: setGlWindow(&gl_vinfo, &gl_context, vo_window); initGl(vo_dwidth, vo_dheight); |