From 2ffc615915964066bd722cbca7b398243e51f78d Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 14 Oct 2008 13:51:30 +0000 Subject: [PATCH] adjust zoom when window resized --- plugin/xlib/gvdevice_xlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/xlib/gvdevice_xlib.c b/plugin/xlib/gvdevice_xlib.c index 70970fbe9..d66195366 100644 --- a/plugin/xlib/gvdevice_xlib.c +++ b/plugin/xlib/gvdevice_xlib.c @@ -88,9 +88,9 @@ static void handle_configure_notify(GVJ_t * job, XConfigureEvent * cev) /* plugin/xlib/gvdevice_xlib.c */ /* lib/gvc/gvevent.c */ - if (job->fit_mode) - job->zoom = MIN((double) cev->width / (double) job->width, - (double) cev->height / (double) job->height); + job->zoom *= 1 + MIN( + ((double) cev->width - (double) job->width) / (double) job->width, + ((double) cev->height - (double) job->height) / (double) job->height); if (cev->width > job->width || cev->height > job->height) job->has_grown = 1; job->width = cev->width; -- 2.40.0