Make -wid behave more consistent.

Original patch by kiriuja |mplayer-patches >ta< en-directo >tod< net|


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15541 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
al 2005-05-21 17:31:44 +00:00
parent 140b59994a
commit 362be18be6
6 changed files with 20 additions and 0 deletions

View File

@ -377,6 +377,8 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
vo_window = WinID ? ((Window) WinID) : mRootWin;
if (WinID)
{
int border;
Window win;
XUnmapWindow(mDisplay, vo_window);
XChangeWindowAttributes(mDisplay, vo_window, xswamask,
&xswa);
@ -389,6 +391,9 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
ButtonReleaseMask |
ExposureMask);
XMapWindow(mDisplay, vo_window);
XGetGeometry(mDisplay, vo_window, &mRootWin,
&vo_dx, &vo_dy, &vo_dwidth, &vo_dheight,
&border, &depth);
} else
XSelectInput(mDisplay, vo_window, ExposureMask);
} else

View File

@ -213,6 +213,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
ButtonPressMask |
ButtonReleaseMask |
ExposureMask);
XMapWindow(mDisplay, vo_window);
} else
XSelectInput(mDisplay, vo_window, ExposureMask);

View File

@ -300,6 +300,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
XUnmapWindow(mDisplay, vo_window);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask );
XMapWindow(mDisplay, vo_window);
} else XSelectInput( mDisplay,vo_window,ExposureMask );
}
else

View File

@ -298,6 +298,11 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
ButtonReleaseMask |
ExposureMask);
XMapWindow(mDisplay, vo_window);
XGetGeometry(mDisplay, vo_window, &mRoot,
&drwX, &drwY, &vo_dwidth, &vo_dheight,
&drwBorderWidth, &drwDepth);
drwX = drwY = 0; // coordinates need to be local to the window
aspect_save_prescale(vo_dwidth, vo_dheight);
} else
{
drwX = vo_dx;

View File

@ -347,6 +347,7 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width,
ButtonPressMask |
ButtonReleaseMask |
ExposureMask);
XMapWindow(mDisplay, vo_window);
} else
XSelectInput(mDisplay, vo_window, ExposureMask);
} else

View File

@ -666,10 +666,17 @@ found_subpic:
vo_window = WinID ? ((Window)WinID) : mRootWin;
if ( WinID )
{
Window mRoot;
uint32_t drwBorderWidth, drwDepth;
XUnmapWindow( mDisplay,vo_window );
XChangeWindowAttributes( mDisplay,vo_window,xswamask,&xswa );
vo_x11_selectinput_witherr( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | PropertyChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask | ExposureMask );
XMapWindow( mDisplay,vo_window );
XGetGeometry(mDisplay, vo_window, &mRoot,
&drwX, &drwY, &vo_dwidth, &vo_dheight,
&drwBorderWidth, &drwDepth);
drwX = drwY = 0; // coordinates need to be local to the window
aspect_save_prescale(vo_dwidth, vo_dheight);
} else { drwX=vo_dx; drwY=vo_dy; }
} else
if ( vo_window == None ){