revert commits 26437-26439

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26468 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
attila 2008-04-19 09:58:01 +00:00
parent 7c76c4a6f6
commit 530df550e4
1 changed files with 14 additions and 11 deletions

View File

@ -367,25 +367,28 @@ static void init_atoms(void)
}
void update_xinerama_info(void) {
#ifdef HAVE_XINERAMA
int screen = xinerama_screen;
// center coordinates of the window
int x = vo_dx + vo_dwidth / 2;
int y = vo_dy + vo_dheight / 2;
xinerama_x = xinerama_y = 0;
#ifdef HAVE_XINERAMA
if (screen >= -1 && XineramaIsActive(mDisplay))
{
XineramaScreenInfo *screens;
int num_screens;
screens = XineramaQueryScreens(mDisplay, &num_screens);
for (screen = num_screens - 1; screen > 0; screen--) {
int left = screens[screen].x_org;
int right = left + screens[screen].width;
int top = screens[screen].y_org;
int bottom = top + screens[screen].height;
if (left <= x && x <= right && top <= y && y <= bottom)
break;
if (screen >= num_screens)
screen = num_screens - 1;
if (screen == -1) {
int x = vo_dx + vo_dwidth / 2;
int y = vo_dy + vo_dheight / 2;
for (screen = num_screens - 1; screen > 0; screen--) {
int left = screens[screen].x_org;
int right = left + screens[screen].width;
int top = screens[screen].y_org;
int bottom = top + screens[screen].height;
if (left <= x && x <= right && top <= y && y <= bottom)
break;
}
}
if (screen < 0)
screen = 0;