diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-06-16 19:31:08 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-06-16 19:31:08 +0000 |
commit | e316dfc312ac7f8a2b579f12bf104fa8968c8f18 (patch) | |
tree | 97b066f2123056559ca3a1dfb2d8e61d871ada19 /app | |
parent | c7ee0084131a20d5cb11fa151423e44af911c1fb (diff) |
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@
Diffstat (limited to 'app')
-rw-r--r-- | app/ssh-askpass/x11-ssh-askpass.c | 11 |
1 files 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); |