1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 21:06:00 +00:00

WinID cleanup, support for Xv

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3831 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-28 13:24:27 +00:00
parent a1ec9d7894
commit 68f8e34bfa
4 changed files with 14 additions and 7 deletions

View File

@ -71,9 +71,6 @@ static XImage *myximage;
static int depth,bpp,mode;
static XWindowAttributes attribs;
/* output window id */
int WinID=0;
//static int vo_dwidth,vo_dheight;
static int Flip_Flag;
@ -284,8 +281,8 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
}
#endif
if ( WinID ){
mywindow = (Window)WinID;
if ( WinID>=0 ){
mywindow = WinID ? ((Window)WinID) : RootWindow( mDisplay,mScreen );
XUnmapWindow( mDisplay,mywindow );
XChangeWindowAttributes( mDisplay,mywindow,xswamask,&xswa );
}

View File

@ -188,9 +188,16 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t
xswa.border_pixel = 0;
xswamask = CWBackPixel | CWBorderPixel;
if ( WinID>=0 ){
mywindow = WinID ? ((Window)WinID) : RootWindow(mDisplay,mScreen);
XUnmapWindow( mDisplay,mywindow );
XChangeWindowAttributes( mDisplay,mywindow,xswamask,&xswa );
} else
mywindow = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen),
hint.x, hint.y, hint.width, hint.height,
0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
hint.x, hint.y, hint.width, hint.height,
0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
vo_x11_classhint( mDisplay,mywindow,"xv" );
vo_hidecursor(mDisplay,mywindow);

View File

@ -45,6 +45,8 @@ Window mRootWin;
int mScreen;
int mLocalDisplay;
/* output window id */
int WinID=-1;
void vo_hidecursor ( Display *disp , Window win )
{

View File

@ -12,6 +12,7 @@ extern Display *mDisplay;
extern Window mRootWin;
extern int mScreen;
extern int mLocalDisplay;
extern int WinID;
int vo_init( void );
int vo_hidecursor ( Display* , Window );