]> git.proxmox.com Git - spiceterm.git/commitdiff
use correct raster on resize
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Oct 2013 10:14:10 +0000 (12:14 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 8 Oct 2013 10:14:10 +0000 (12:14 +0200)
spiceterm.c

index 680a5c7d952c09c8308daf2eee88d659eedebc9b..dd63b90e0a6c95b21d1f3add8646ca191e0e0731 100644 (file)
@@ -2031,12 +2031,15 @@ init_spiceterm(spiceTerm *vt, uint32_t width, uint32_t height)
 static void
 spiceterm_resize(spiceTerm *vt, uint32_t width, uint32_t height)
 {
-    DPRINTF(0, "width=%u height=%u", width, height);
-
+    width = (width/8)*8;
+    height = (height/16)*16;
+    
     if (vt->screen->width == width && vt->screen->height == height) {
         return;
     }
 
+    DPRINTF(0, "width=%u height=%u", width, height);
+
     spice_screen_resize(vt->screen, width, height);
 
     init_spiceterm(vt, width, height);
@@ -2151,7 +2154,7 @@ main (int argc, char** argv)
 
     if (0) print_usage(NULL); // fixme:
 
-    spiceTerm *vt = create_spiceterm (argc, argv, 745, 400, 10);
+    spiceTerm *vt = create_spiceterm (argc, argv, 744, 400, 10);
 
     setlocale(LC_ALL, ""); // set from environment