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:
parent
a1ec9d7894
commit
68f8e34bfa
@ -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 );
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -45,6 +45,8 @@ Window mRootWin;
|
||||
int mScreen;
|
||||
int mLocalDisplay;
|
||||
|
||||
/* output window id */
|
||||
int WinID=-1;
|
||||
|
||||
void vo_hidecursor ( Display *disp , Window win )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user