From e5b23895c8a7a1945e45328a70f1c5db1472290e Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 16 Jun 2019 19:31:07 +0000 Subject: [PATCH] Fix the size of indicators in multi-monitors setups. ssh-askpass(1) is computing the size of its indicators relatively to the screen resolution. When multiple monitors are present, the support for Xinerama computes the dimensions of the window to be created relatively to the screen on which it will appear. But the computation of the indicator size is based on the size of the whole display, resulting in too small indicators (and too many of them if the screens hare layed out horizontally). Fix that by computing the resolution of the whole display before taking xinerama into account. ok djm@ --- app/ssh-askpass/x11-ssh-askpass.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/ssh-askpass/x11-ssh-askpass.c b/app/ssh-askpass/x11-ssh-askpass.c index 649413636..ccc6cf695 100644 --- a/app/ssh-askpass/x11-ssh-askpass.c +++ b/app/ssh-askpass/x11-ssh-askpass.c @@ -1507,6 +1507,12 @@ int main(int argc, char **argv) app.screen_height = HeightOfScreen(app.screen); app.screen_xoffset = 0; app.screen_yoffset = 0; + + app.xResolution = + app.screen_width * 1000 / WidthMMOfScreen(app.screen); + app.yResolution = + app.screen_height * 1000 / HeightMMOfScreen(app.screen); + if (XineramaIsActive(app.dpy) && (screens = XineramaQueryScreens(app.dpy, &nscreens)) != NULL && nscreens) { @@ -1517,11 +1523,6 @@ int main(int argc, char **argv) XFree(screens); } - app.xResolution = - app.screen_width * 1000 / WidthMMOfScreen(app.screen); - app.yResolution = - app.screen_height * 1000 / HeightMMOfScreen(app.screen); - createDialog(&app); createGCs(&app);