diff options
-rw-r--r-- | hw/display/vmware_vga.c | 3 | ||||
-rw-r--r-- | ui/vnc.c | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index bef0d7d69a..e2969a6c81 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -29,7 +29,6 @@ #include "qemu/log.h" #include "hw/loader.h" #include "trace.h" -#include "ui/vnc.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" @@ -220,7 +219,7 @@ enum { /* These values can probably be changed arbitrarily. */ #define SVGA_SCRATCH_SIZE 0x8000 -#define SVGA_MAX_WIDTH ROUND_UP(2360, VNC_DIRTY_PIXELS_PER_BIT) +#define SVGA_MAX_WIDTH 2368 #define SVGA_MAX_HEIGHT 1770 #ifdef VERBOSE @@ -687,6 +687,10 @@ static void vnc_desktop_resize(VncState *vs) !vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) { return; } + if (vs->client_width == pixman_image_get_width(vs->vd->server) && + vs->client_height == pixman_image_get_height(vs->vd->server)) { + return; + } assert(pixman_image_get_width(vs->vd->server) < 65536 && pixman_image_get_width(vs->vd->server) >= 0); @@ -2042,10 +2046,9 @@ static void framebuffer_update_request(VncState *vs, int incremental, } else { vs->update = VNC_STATE_UPDATE_FORCE; vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h); - vnc_colordepth(vs); - vnc_desktop_resize(vs); - vnc_led_state_change(vs); - vnc_cursor_define(vs); + if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) { + vnc_desktop_resize_ext(vs, 0); + } } } @@ -2189,7 +2192,10 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) break; } } + vnc_desktop_resize(vs); check_pointer_type_change(&vs->mouse_mode_notifier, NULL); + vnc_led_state_change(vs); + vnc_cursor_define(vs); } static void set_pixel_conversion(VncState *vs) |