[virt-tools-list] [PATCH] display: Set useful values for MIN_DISPLAY_{WIDTH, HEIGHT}

Fabiano Fidêncio fidencio at redhat.com
Mon Jan 11 22:39:02 UTC 2016


Nowadays the value for MIN_DISPLAY_{WIDTH,HEIGHT} is 50. This arbitrary
value doesn't bring any benefit, doesn't provide a useful size for a
desktop to be usable and can actually trigger some undefined behavior
when reaching resolutions that are lower than the ones provided by the
video drivers (as in rhbz#1296878).
In order to avoid these issues and provide a minimum resolution that can
still be useful for our users, let's use the same values for minimum
width and height used by the linux QXL drivers (320x200).

Related: rhbz#1296878
---
 src/virt-viewer-display.c | 4 ++--
 src/virt-viewer-display.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
index 036b713..cda1c8b 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -116,7 +116,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                                                      "Desktop width",
                                                      MIN_DISPLAY_WIDTH,
                                                      G_MAXINT32,
-                                                     100,
+                                                     MIN_DISPLAY_WIDTH,
                                                      G_PARAM_READWRITE));
 
     g_object_class_install_property(object_class,
@@ -126,7 +126,7 @@ virt_viewer_display_class_init(VirtViewerDisplayClass *class)
                                                      "Desktop height",
                                                      MIN_DISPLAY_HEIGHT,
                                                      G_MAXINT32,
-                                                     100,
+                                                     MIN_DISPLAY_HEIGHT,
                                                      G_PARAM_READWRITE));
 
     g_object_class_install_property(object_class,
diff --git a/src/virt-viewer-display.h b/src/virt-viewer-display.h
index a899bb4..a279697 100644
--- a/src/virt-viewer-display.h
+++ b/src/virt-viewer-display.h
@@ -29,8 +29,8 @@
 
 G_BEGIN_DECLS
 
-#define MIN_DISPLAY_WIDTH 50
-#define MIN_DISPLAY_HEIGHT 50
+#define MIN_DISPLAY_WIDTH 320
+#define MIN_DISPLAY_HEIGHT 200
 
 #define VIRT_VIEWER_TYPE_DISPLAY virt_viewer_display_get_type()
 
-- 
2.5.0




More information about the virt-tools-list mailing list