Mercurial > mplayer.hg
diff libvo/vo_xvmc.c @ 23655:00aa61cde84a
Make X11 window creation and (with -fixed-vo) management simpler and more
consistent by introducing a new function that handles most of the
ugly things. Changes of behaviour with some vos is unavoidable, bug reports
welcome.
author | reimar |
---|---|
date | Wed, 27 Jun 2007 10:26:13 +0000 |
parents | 6d9bf745cd28 |
children | 8443a81e4ae3 |
line wrap: on
line diff
--- a/libvo/vo_xvmc.c Wed Jun 27 10:08:21 2007 +0000 +++ b/libvo/vo_xvmc.c Wed Jun 27 10:26:13 2007 +0000 @@ -695,33 +695,9 @@ aspect_save_prescale(vo_dwidth, vo_dheight); } } else - if ( vo_window == None ){ - vo_window = XCreateWindow(mDisplay, mRootWin, - hint.x, hint.y, hint.width, hint.height, - 0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa); - - vo_x11_classhint( mDisplay,vo_window,"xvmc" ); - vo_hidecursor(mDisplay,vo_window); - - vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PropertyChangeMask | ExposureMask | - ((WinID==0) ? 0 : (PointerMotionMask - | ButtonPressMask | ButtonReleaseMask)) ); - XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); - XSetWMNormalHints( mDisplay,vo_window,&hint ); - XMapWindow(mDisplay, vo_window); - vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height); - if ( flags&VOFLAG_FULLSCREEN ) vo_x11_fullscreen(); - else { - vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); - } - } else { - // vo_fs set means we were already at fullscreen - vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); - vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height); - if ( flags&VOFLAG_FULLSCREEN && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file - } - -// vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 ); + vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags, + CopyFromParent, "xvmc", title); + XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &xgcv);