diff options
-rw-r--r-- | src/cmd/jpg/bmp.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/gif.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/jpg.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/png.c | 2 | ||||
-rw-r--r-- | src/cmd/jpg/ppm.c | 7 |
5 files changed, 7 insertions, 8 deletions
diff --git a/src/cmd/jpg/bmp.c b/src/cmd/jpg/bmp.c index 4d6ddd9c..e9ab20c4 100644 --- a/src/cmd/jpg/bmp.c +++ b/src/cmd/jpg/bmp.c @@ -36,7 +36,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); flushimage(display, 1); } diff --git a/src/cmd/jpg/gif.c b/src/cmd/jpg/gif.c index 29675118..d154740b 100644 --- a/src/cmd/jpg/gif.c +++ b/src/cmd/jpg/gif.c @@ -49,7 +49,7 @@ eresized(int new) if(allims==nil || allims[which]==nil) return; r = rectaddpt(allims[0]->r, subpt(screen->r.min, allims[0]->r.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); r = rectaddpt(r, subpt(allims[which]->r.min, allims[0]->r.min)); drawop(screen, r, allims[which], allmasks[which], allims[which]->r.min, S); diff --git a/src/cmd/jpg/jpg.c b/src/cmd/jpg/jpg.c index fafa9b8c..f74da4c5 100644 --- a/src/cmd/jpg/jpg.c +++ b/src/cmd/jpg/jpg.c @@ -38,7 +38,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->clipr, subpt(screen->r.min, image->clipr.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); diff --git a/src/cmd/jpg/png.c b/src/cmd/jpg/png.c index 06cedc60..115524cd 100644 --- a/src/cmd/jpg/png.c +++ b/src/cmd/jpg/png.c @@ -36,7 +36,7 @@ eresized(int new) if(image == nil) return; r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); - if(!new) + if(!new && !winsize) drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); diff --git a/src/cmd/jpg/ppm.c b/src/cmd/jpg/ppm.c index d90344ed..c9c8d377 100644 --- a/src/cmd/jpg/ppm.c +++ b/src/cmd/jpg/ppm.c @@ -33,10 +33,9 @@ eresized(int new) } if(image == nil) return; - r = insetrect(screen->clipr, Edge+Border); - r.max.x = r.min.x+Dx(image->r); - r.max.y = r.min.y+Dy(image->r); - border(screen, r, -Border, nil, ZP); + r = rectaddpt(image->r, subpt(screen->r.min, image->r.min)); + if(!new && !winsize) + drawresizewindow(r); draw(screen, r, image, nil, image->r.min); flushimage(display, 1); } |