Mercurial > mplayer.hg
changeset 8988:3b328492f94d
xinerama fix part 1
xmga only for the moment, have to work on xvidix.
author | attila |
---|---|
date | Sat, 18 Jan 2003 14:33:29 +0000 |
parents | c83c18f58964 |
children | 3640c15ddd7d |
files | libvo/mga_common.c |
diffstat | 1 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/mga_common.c Sat Jan 18 14:22:30 2003 +0000 +++ b/libvo/mga_common.c Sat Jan 18 14:33:29 2003 +0000 @@ -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; @@ -472,13 +475,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<num_screens && + ((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))) { 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 */ drwcX = drwcX - screens[i].x_org; drwcY = drwcY - screens[i].y_org;