diff options
author | rsc <devnull@localhost> | 2004-05-14 23:11:48 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-05-14 23:11:48 +0000 |
commit | 97fed159e4d5edf41b9875482209a5210ad84b3a (patch) | |
tree | a412648e7a11d4ec4353419219a2ffa8bbe59801 | |
parent | 983990c806eb019cb490449cac70032417222a41 (diff) | |
download | plan9port-97fed159e4d5edf41b9875482209a5210ad84b3a.tar.gz plan9port-97fed159e4d5edf41b9875482209a5210ad84b3a.tar.bz2 plan9port-97fed159e4d5edf41b9875482209a5210ad84b3a.zip |
avoid stupid aspect ratios.
-rw-r--r-- | src/libdraw/x11-init.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libdraw/x11-init.c b/src/libdraw/x11-init.c index 5424e383..fe7a3371 100644 --- a/src/libdraw/x11-init.c +++ b/src/libdraw/x11-init.c @@ -326,8 +326,12 @@ xattach(char *label) if(parsewinsize(winsize, &r, &havemin) < 0) sysfatal("%r"); }else{ - r = Rect(0, 0, WidthOfScreen(xscreen)*3/4, - HeightOfScreen(xscreen)*3/4); + r = Rect(0, 0, WidthOfScreen(xscreen)*2/3, + HeightOfScreen(xscreen)*2/3); + if(Dx(r) > Dy(r)*3/2) + r.max.x = r.min.x + Dy(r)*3/2; + if(Dy(r) > Dx(r)*3/2) + r.max.y = r.min.y + Dx(r)*3/2; havemin = 0; } |