summaryrefslogtreecommitdiff
path: root/app/ssh-askpass/x11-ssh-askpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/ssh-askpass/x11-ssh-askpass.c')
-rw-r--r--app/ssh-askpass/x11-ssh-askpass.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/ssh-askpass/x11-ssh-askpass.c b/app/ssh-askpass/x11-ssh-askpass.c
index 0cb68f795..56ee7ffc0 100644
--- a/app/ssh-askpass/x11-ssh-askpass.c
+++ b/app/ssh-askpass/x11-ssh-askpass.c
@@ -698,8 +698,8 @@ void createDialog(AppInfo *app)
calcButtonLabelPosition(&(d->okButton));
calcButtonLabelPosition(&(d->cancelButton));
- d->w3.w.x = (app->screen_width - d->w3.w.width) / 2;
- d->w3.w.y = (app->screen_height - d->w3.w.height) / 3;
+ d->w3.w.x = app->screen_xoffset + (app->screen_width - d->w3.w.width) / 2;
+ d->w3.w.y = app->screen_yoffset + (app->screen_height - d->w3.w.height) / 3;
app->dialog = d;
}
@@ -1504,11 +1504,15 @@ int main(int argc, char **argv)
app.screen_width = WidthOfScreen(app.screen);
app.screen_height = HeightOfScreen(app.screen);
+ app.screen_xoffset = 0;
+ app.screen_yoffset = 0;
if (XineramaIsActive(app.dpy) &&
(screens = XineramaQueryScreens(app.dpy, &nscreens)) != NULL &&
nscreens) {
app.screen_width = screens[0].width;
app.screen_height = screens[0].height;
+ app.screen_xoffset = screens[0].x_org;
+ app.screen_yoffset = screens[0].y_org;
XFree(screens);
}