From f6f2964b9b2997b15afa171594e3cdc91b232bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 10 Jun 2016 17:22:18 +0200 Subject: [PATCH] display: use MIN_DISPLAY_{WIDTH, HEIGHT} as the minimum possible value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabiano FidĂȘncio Acked-by: Pavel Grunt --- src/virt-viewer-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c index c2e6c4d..2dbaba1 100644 --- a/src/virt-viewer-display.c +++ b/src/virt-viewer-display.c @@ -419,8 +419,8 @@ virt_viewer_display_size_allocate(GtkWidget *widget, border_width = gtk_container_get_border_width(GTK_CONTAINER(display)); - width = MAX(1, allocation->width - 2 * border_width); - height = MAX(1, allocation->height - 2 * border_width); + width = MAX(MIN_DISPLAY_WIDTH, allocation->width - 2 * border_width); + height = MAX(MIN_DISPLAY_HEIGHT, allocation->height - 2 * border_width); desktopAspect = (double) priv->desktopWidth / (double) priv->desktopHeight; actualAspect = (double) width / (double) height;