[Mplayer-cvslog] CVS: main/libvo vo_xvidix.c,1.57,1.58
Attila Kinali CVS
attila at mplayerhq.hu
Sat Jan 18 16:05:09 CET 2003
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv30447/libvo
Modified Files:
vo_xvidix.c
Log Message:
xinerama fix part 1 - count your paranthesis
xvidix should now work too
Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- vo_xvidix.c 27 Dec 2002 16:42:11 -0000 1.57
+++ vo_xvidix.c 18 Jan 2003 15:05:06 -0000 1.58
@@ -76,6 +76,10 @@
extern void set_video_eq( int cap );
+#ifdef HAVE_XINERAMA
+extern int xinerama_screen;
+#endif
+
static void set_window(int force_update)
{
Window mRoot;
@@ -127,10 +131,26 @@
screens = XineramaQueryScreens(mDisplay, &num_screens);
/* find the screen we are on */
- while ((screens[i].x_org <= drwcX) || (screens[i].y_org <= 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++;
+ (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;
More information about the MPlayer-cvslog
mailing list