diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-17 01:30:35 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-17 01:30:35 +0200 |
commit | ad993a2618e4265e4282bdb5faa583fffa6163e3 (patch) | |
tree | 7f1080cbaa812f80726d9e08330c4d232295f464 /sys/src/cmd/rio | |
parent | 2fd6c5e0f6e983346084039a12703546f8f70bb9 (diff) |
rio: translate window when scaling results in bad window rect on screen resize
when the screen is resized, we scale the windows to
match the new screen size. when the screen is too
small tho, the scaled down window rect might result
in a bad window rect. before, we kept the window
in its original position and size making it possible
to move a window out of the screen by resizing its
outer rio.
now, if we get a bad rectangle after scaling, we
just tralslate position to the new scaled r.min
point but preserve its orginal size. this keeps
the window always accessible.
Diffstat (limited to 'sys/src/cmd/rio')
-rw-r--r-- | sys/src/cmd/rio/rio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c index af4c6b47d..37a7e3d62 100644 --- a/sys/src/cmd/rio/rio.c +++ b/sys/src/cmd/rio/rio.c @@ -643,7 +643,7 @@ resized(void) r.max.x = (r.max.x*n.x)/o.x; r.max.y = (r.max.y*n.y)/o.y; if(!goodrect(r)) - r = rectsubpt(w->i->r, viewr.min); + r = rectsubpt(w->i->r, subpt(w->i->r.min, r.min)); r = rectaddpt(r, screen->clipr.min); for(j=0; j<nhidden; j++) if(w == hidden[j]) |