src: relax minimum desktop width/height

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é <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-05-20 12:57:40 +01:00
parent aa6b4b40b8
commit 5367a7b123

View File

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