diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-25 21:47:13 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-25 21:47:13 +0000 |
commit | be98669d74b588aacf946cbf1c2d09421796d260 (patch) | |
tree | 1577b0999c91aa05fa23f42bbe30705c2558b29c | |
parent | 05330aeecedbac7d42f9bbd20d1a653f10b5af23 (diff) |
bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it hasXORG-RELEASE-1-BASEXEVIE-MERGEXINERAMA_2
been decided that the priority is to preserve the server's internal
API/ABI so that third-party drivers that depend on symbols like
noPanoramiXExtension, etc., would not need to be recompiled. Too bad
gcc on Linux doesn't support ELF's weak symbols as that would have been
a reasonable solution for preserving the ABI. N.B.: While symbols, i.e.
functions and variables revert to the old name, I did not revert build
names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and
it's just a build issue that has no impact on the binary output of the
build.
-rw-r--r-- | chooser.c | 13 | ||||
-rw-r--r-- | greeter/Login.c | 13 | ||||
-rw-r--r-- | greeter/greet.c | 13 |
3 files changed, 21 insertions, 18 deletions
@@ -1066,8 +1066,8 @@ main (int argc, char **argv) Dimension width, height; Position x, y; #ifdef USE_XINERAMA - XRectangle *screens; - int s_num; + XineramaScreenInfo *screens; + int s_num; #endif @@ -1099,11 +1099,12 @@ main (int argc, char **argv) XtGetValues (toplevel, position, (Cardinal) 2); #ifdef USE_XINERAMA if ( - XineramaActive(XtDisplay(toplevel), XtWindow(toplevel)) && - XineramaGetData(XtDisplay(toplevel), XtWindow(toplevel), &screens, &s_num)) + XineramaIsActive(XtDisplay(toplevel)) && + (screens = XineramaQueryScreens(XtDisplay(toplevel), &s_num)) != NULL + ) { - x = (Position)(screens[0].x + (screens[0].width - width) / 2); - y = (Position)(screens[0].y + (screens[0].height - height) / 3); + x = (Position)(screens[0].x_org + (screens[0].width - width) / 2); + y = (Position)(screens[0].y_org + (screens[0].height - height) / 3); XFree(screens); } diff --git a/greeter/Login.c b/greeter/Login.c index 337316d..f8c983b 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -1025,8 +1025,8 @@ static void Initialize ( Arg position[2]; Position x, y; #ifdef USE_XINERAMA - XRectangle *screens; - int s_num; + XineramaScreenInfo *screens; + int s_num; #endif #ifdef XPM @@ -1167,13 +1167,14 @@ SkipXpmLoad: } #ifdef USE_XINERAMA if ( - XineramaActive(XtDisplay(w), XtWindow(w)) && - XineramaGetData(XtDisplay(w), XtWindow(w), &screens, &s_num)) + XineramaIsActive(XtDisplay(w)) && + (screens = XineramaQueryScreens(XtDisplay(w), &s_num)) != NULL + ) { if ((x = w->core.x) == -1) - x = screens[0].x + (int)(screens[0].width - w->core.width) / 2; + x = screens[0].x_org + (int)(screens[0].width - w->core.width) / 2; if ((y = w->core.y) == -1) - y = screens[0].y + (int)(screens[0].height - w->core.height) / 3; + y = screens[0].y_org + (int)(screens[0].height - w->core.height) / 3; XFree(screens); } diff --git a/greeter/greet.c b/greeter/greet.c index fd1e9e1..e0b9c06 100644 --- a/greeter/greet.c +++ b/greeter/greet.c @@ -181,8 +181,8 @@ InitGreet (struct display *d) static char *argv[] = { "xlogin", 0 }; Display *dpy; #ifdef USE_XINERAMA - XRectangle *screens; - int s_num; + XineramaScreenInfo *screens; + int s_num; #endif Debug ("greet %s\n", d->name); @@ -230,13 +230,14 @@ InitGreet (struct display *d) #ifdef USE_XINERAMA if ( - XineramaActive(dpy, XtWindow(login)) && - XineramaGetData(dpy, XtWindow(login), &screens, &s_num)) + XineramaIsActive(dpy) && + (screens = XineramaQueryScreens(dpy, &s_num)) != NULL + ) { XWarpPointer(dpy, None, XRootWindowOfScreen (scrn), 0, 0, 0, 0, - screens[0].x + screens[0].width / 2, - screens[0].y + screens[0].height / 2); + screens[0].x_org + screens[0].width / 2, + screens[0].y_org + screens[0].height / 2); XFree(screens); } |