mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
avoid stupid aspect ratios.
This commit is contained in:
parent
983990c806
commit
97fed159e4
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue