From 5367a7b123f886dddbe0cb7dc3d2919eb804f516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 20 May 2021 12:57:40 +0100 Subject: [PATCH] src: relax minimum desktop width/height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The desktop-width / desktop-height properties are set to have a min valid value of 320x200, and this also matches the minimum window dimensions reported to GTK. In practice when a guest restarts, spice can report width/height values smaller than this (virt-viewer:9359): GLib-GObject-WARNING **: 12:57:05.556: value "64" of type 'gint' is invalid or out of range for property 'desktop-width' of type 'gint' (virt-viewer:9359): GLib-GObject-WARNING **: 12:57:05.556: value "64" of type 'gint' is invalid or out of range for property 'desktop-height' of type 'gint' There is not an obvious need to enforce this minimum on the properties, as the window dimension sizing will do the right thing regardless. Signed-off-by: Daniel P. Berrangé --- 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 01a2200..a00c5b8 100644 --- a/src/virt-viewer-display.c +++ b/src/virt-viewer-display.c @@ -101,7 +101,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class) g_param_spec_int("desktop-width", "Width", "Desktop width", - MIN_DISPLAY_WIDTH, + 1, G_MAXINT32, MIN_DISPLAY_WIDTH, G_PARAM_READWRITE)); @@ -111,7 +111,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class) g_param_spec_int("desktop-height", "Height", "Desktop height", - MIN_DISPLAY_HEIGHT, + 1, G_MAXINT32, MIN_DISPLAY_HEIGHT, G_PARAM_READWRITE));