diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-18 23:09:32 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-12-18 23:09:32 +0000 |
commit | 569af565be9b32a3404c6ace94e13c9140188e05 (patch) | |
tree | ce64bd880b588fb157b3484a16dc4299f5a8bb56 | |
parent | 41bdef7f793b5c073776fbd3b23f6b33d7fdc04f (diff) |
/home/kaleb/xin.commsg
-rw-r--r-- | chooser.c | 15 | ||||
-rw-r--r-- | greeter/Login.c | 13 | ||||
-rw-r--r-- | greeter/greet.c | 13 |
3 files changed, 19 insertions, 22 deletions
@@ -1,5 +1,5 @@ /* - * $XdotOrg: xc/programs/xdm/chooser.c,v 1.1.4.3 2003/12/06 13:24:29 kaleb Exp $ + * $XdotOrg: xc/programs/xdm/chooser.c,v 1.1.4.4 2003/12/06 18:51:45 kaleb Exp $ * $Xorg: chooser.c,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -1066,8 +1066,8 @@ main (int argc, char **argv) Dimension width, height; Position x, y; #ifdef USE_XINERAMA - XineramaScreenInfo *screens; - int s_num; + XRectangle *screens; + int s_num; #endif @@ -1099,12 +1099,11 @@ main (int argc, char **argv) XtGetValues (toplevel, position, (Cardinal) 2); #ifdef USE_XINERAMA if ( - XineramaIsActive(XtDisplay(toplevel)) && - (screens = XineramaQueryScreens(XtDisplay(toplevel), &s_num)) != NULL - ) + XineramaActive(XtDisplay(toplevel), XtWindow(toplevel)) && + XineramaGetData(XtDisplay(toplevel), XtWindow(toplevel), &screens, &s_num)) { - x = (Position)(screens[0].x_org + (screens[0].width - width) / 2); - y = (Position)(screens[0].y_org + (screens[0].height - height) / 3); + x = (Position)(screens[0].x + (screens[0].width - width) / 2); + y = (Position)(screens[0].y + (screens[0].height - height) / 3); XFree(screens); } diff --git a/greeter/Login.c b/greeter/Login.c index f8c983b..337316d 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 - XineramaScreenInfo *screens; - int s_num; + XRectangle *screens; + int s_num; #endif #ifdef XPM @@ -1167,14 +1167,13 @@ SkipXpmLoad: } #ifdef USE_XINERAMA if ( - XineramaIsActive(XtDisplay(w)) && - (screens = XineramaQueryScreens(XtDisplay(w), &s_num)) != NULL - ) + XineramaActive(XtDisplay(w), XtWindow(w)) && + XineramaGetData(XtDisplay(w), XtWindow(w), &screens, &s_num)) { if ((x = w->core.x) == -1) - x = screens[0].x_org + (int)(screens[0].width - w->core.width) / 2; + x = screens[0].x + (int)(screens[0].width - w->core.width) / 2; if ((y = w->core.y) == -1) - y = screens[0].y_org + (int)(screens[0].height - w->core.height) / 3; + y = screens[0].y + (int)(screens[0].height - w->core.height) / 3; XFree(screens); } diff --git a/greeter/greet.c b/greeter/greet.c index e0b9c06..fd1e9e1 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 - XineramaScreenInfo *screens; - int s_num; + XRectangle *screens; + int s_num; #endif Debug ("greet %s\n", d->name); @@ -230,14 +230,13 @@ InitGreet (struct display *d) #ifdef USE_XINERAMA if ( - XineramaIsActive(dpy) && - (screens = XineramaQueryScreens(dpy, &s_num)) != NULL - ) + XineramaActive(dpy, XtWindow(login)) && + XineramaGetData(dpy, XtWindow(login), &screens, &s_num)) { XWarpPointer(dpy, None, XRootWindowOfScreen (scrn), 0, 0, 0, 0, - screens[0].x_org + screens[0].width / 2, - screens[0].y_org + screens[0].height / 2); + screens[0].x + screens[0].width / 2, + screens[0].y + screens[0].height / 2); XFree(screens); } |