diff options
-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); } |