summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 14:33:29 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-01-18 14:33:29 +0000
commitdf3fd2baf31d4d106a2a4e59647604fd35e635e4 (patch)
tree77f4581d7dfb48ac87aa664d33055d4babfd6d1a /libvo
parent1991d31057f02564adfe48cf79d5a65cb0070fc6 (diff)
downloadmpv-df3fd2baf31d4d106a2a4e59647604fd35e635e4.tar.bz2
mpv-df3fd2baf31d4d106a2a4e59647604fd35e635e4.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/mga_common.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index cb376587ce..e86c94834d 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -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 @@ static void set_window( void ){
/* 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;