From 8a3547be3168c07a050d01bada23b94b272516ec Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 8 Oct 2013 12:14:10 +0200 Subject: [PATCH] use correct raster on resize --- spiceterm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spiceterm.c b/spiceterm.c index 680a5c7..dd63b90 100644 --- a/spiceterm.c +++ b/spiceterm.c @@ -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 -- 2.39.2