ref: b404464b2e4bf770168fd670ea9fb662d9dbca32
parent: 15b1463567d2173d93838aeabac10d86a76c2c0c
author: phil9 <telephil9@gmail.com>
date: Sat Jan 23 00:41:48 EST 2021
fix image position being reset upon window resize or move if image is panned within the window and the window is resized or moved the image position will be reset to (0;0).
--- a/vcrop.c
+++ b/vcrop.c
@@ -23,7 +23,7 @@
if(new && getwindow(display, Refnone)<0)
sysfatal("cannot reattach: %r");
draw(screen, screen->r, bg, nil, ZP);
- draw(screen, screen->r, n, nil, n->r.min);
+ draw(screen, rectaddpt(n->r, addpt(pos, screen->r.min)), n, nil, n->r.min);
}
void