diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/ssh-askpass/x11-ssh-askpass.c | 8 | ||||
-rw-r--r-- | app/ssh-askpass/x11-ssh-askpass.h | 2 |
2 files changed, 8 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); } diff --git a/app/ssh-askpass/x11-ssh-askpass.h b/app/ssh-askpass/x11-ssh-askpass.h index 547d2a38f..7875f4c26 100644 --- a/app/ssh-askpass/x11-ssh-askpass.h +++ b/app/ssh-askpass/x11-ssh-askpass.h @@ -160,6 +160,8 @@ typedef struct Screen *screen; long screen_width; long screen_height; + long screen_xoffset; + long screen_yoffset; Window rootWindow; Pixel black; Pixel white; |