display: use MIN_DISPLAY_{WIDTH, HEIGHT} as the minimum possible value

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
Fabiano Fidêncio 2016-06-10 17:22:18 +02:00
parent bc38771b7c
commit f6f2964b9b

View File

@ -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;