1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-24 04:08:19 +00:00

xinerama fix part 1

xmga only for the moment, have to work on xvidix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8989 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
attila 2003-01-18 14:33:29 +00:00
parent 1991d31057
commit df3fd2baf3

View File

@ -8,6 +8,9 @@
static void set_window( void ); /* forward declaration to kill warnings */ static void set_window( void ); /* forward declaration to kill warnings */
#ifdef VO_XMGA #ifdef VO_XMGA
static void mDrawColorKey( void ); /* forward declaration to kill warnings */ static void mDrawColorKey( void ); /* forward declaration to kill warnings */
#ifdef HAVE_XINERAMA
extern int xinerama_screen;
#endif
#endif #endif
static int mga_next_frame=0; static int mga_next_frame=0;
@ -472,13 +475,28 @@ static void set_window( void ){
/* find the screen we are on */ /* find the screen we are on */
i = 0; i = 0;
while(!(screens[i].x_org <= drwcX && screens[i].y_org <= drwcY && while(i<num_screens &&
screens[i].x_org + screens[i].width >= drwcX && ((screens[i].x_org < drwcX) ||
screens[i].y_org + screens[i].height >= drwcY )) (screens[i].y_org < drwcY) ||
(screens[i].x_org + screens[i].width >= drwcX) ||
(screens[i].y_org + screens[i].height >= drwcY)))
{ {
i++; i++;
} }
if(i<num_screens)
{
/* save the screen we are on */
xinerama_screen = i;
} else {
/* oops.. couldnt find the screen we are on
* because the upper left corner left the
* visual range. assume we are still on the
* same screen
*/
i = xinerama_screen;
}
/* set drwcX and drwcY to the right values */ /* set drwcX and drwcY to the right values */
drwcX = drwcX - screens[i].x_org; drwcX = drwcX - screens[i].x_org;
drwcY = drwcY - screens[i].y_org; drwcY = drwcY - screens[i].y_org;