[virt-tools-list] [PATCH virt-viewer 1/2] resize: avoid rounding issues

Marc-André Lureau marcandre.lureau at gmail.com
Tue Mar 11 15:38:45 UTC 2014


From: Marc-André Lureau <marcandre.lureau at redhat.com>

desktopWidth / desktopAspect
= desktopWidth / ((double)desktopWidth / (double)desktopHeight)
= desktopHeight

This solves the display being blurry with some resolutions:
https://bugzilla.redhat.com/show_bug.cgi?id=1056041
---
 src/virt-viewer-window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 05d5fe7..08cacd5 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -450,7 +450,7 @@ virt_viewer_window_resize(VirtViewerWindow *self, gboolean keep_win_size)
             height = desktopHeight;
         } else {
             width = desktopWidth;
-            height = desktopWidth / desktopAspect;
+            height = desktopHeight;
         }
     } else {
         width = desktopWidth;
-- 
1.8.5.3




More information about the virt-tools-list mailing list