[virt-tools-list] [virt-viewer 2/3] display: use MIN_DISPLAY_{WIDTH, HEIGHT} as the minimum possible value

Fabiano Fidêncio fidencio at redhat.com
Fri Jun 10 15:22:18 UTC 2016


Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 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;
-- 
2.7.4




More information about the virt-tools-list mailing list