diff -u /home/attila/src/mplayer/main/libvo/mga_common.c libvo/mga_common.c --- /home/attila/src/mplayer/main/libvo/mga_common.c 2002-11-20 22:05:53.000000000 +0100 +++ libvo/mga_common.c 2003-01-02 13:01:39.000000000 +0100 @@ -8,6 +8,9 @@ static void set_window( void ); /* forward declaration to kill warnings */ #ifdef VO_XMGA static void mDrawColorKey( void ); /* forward declaration to kill warnings */ +#ifdef HAVE_XINERAMA +extern int xinerama_screen; +#endif #endif static int mga_next_frame=0; @@ -469,13 +472,28 @@ /* find the screen we are on */ i = 0; - while(!(screens[i].x_org <= drwcX && screens[i].y_org <= drwcY && - screens[i].x_org + screens[i].width >= drwcX && - screens[i].y_org + screens[i].height >= drwcY )) + while(i= drwcX) || + (screens[i].y_org + screens[i].height >= drwcY))) { i++; } + if(i= drwcX) || (screens[i].y_org + screens[i].height >= drwcY)) - i++; + { + i++; + } + + if(i