[virt-tools-list] [PATCH] display: set min value for desktop-{width, height} props as MIN_DISPLAY_{WIDTH, HEIGHT}

Fabiano Fidêncio fidencio at redhat.com
Fri Jan 8 11:39:54 UTC 2016


Otherwise we can have warnings when resizing the virt-viewer window to
the smallest possible size, like:

(virt-viewer:11187): GLib-GObject-WARNING **: value "50" of type `gint'
is invalid or out of range for property `desktop-height' of type `gint'

Related: rhbz#1296878
---
 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 d8b3312..036b713 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -114,7 +114,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                                     g_param_spec_int("desktop-width",
                                                      "Width",
                                                      "Desktop width",
-                                                     100,
+                                                     MIN_DISPLAY_WIDTH,
                                                      G_MAXINT32,
                                                      100,
                                                      G_PARAM_READWRITE));
@@ -124,7 +124,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                                     g_param_spec_int("desktop-height",
                                                      "Height",
                                                      "Desktop height",
-                                                     100,
+                                                     MIN_DISPLAY_HEIGHT,
                                                      G_MAXINT32,
                                                      100,
                                                      G_PARAM_READWRITE));
-- 
2.5.0




More information about the virt-tools-list mailing list