Merge remote-tracking branch 'remotes/kraxel/tags/ui-20210127-pull-request' into staging

vnc: fix gtk-vnc compatibility issues.
vnc: vmware svga cleanup

# gpg: Signature made Wed 27 Jan 2021 11:00:59 GMT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20210127-pull-request:
  hw/display/vmware_vga: Remove dependency on VNC header
  vnc: send extended desktop resize on update requests
  Revert "vnc: move initialization to framebuffer_update_request"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2021-01-28 10:47:00 +00:00
2 changed files with 11 additions and 6 deletions

View File

@@ -29,7 +29,6 @@
#include "qemu/log.h" #include "qemu/log.h"
#include "hw/loader.h" #include "hw/loader.h"
#include "trace.h" #include "trace.h"
#include "ui/vnc.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
@@ -220,7 +219,7 @@ enum {
/* These values can probably be changed arbitrarily. */ /* These values can probably be changed arbitrarily. */
#define SVGA_SCRATCH_SIZE 0x8000 #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 #define SVGA_MAX_HEIGHT 1770
#ifdef VERBOSE #ifdef VERBOSE

View File

@@ -687,6 +687,10 @@ static void vnc_desktop_resize(VncState *vs)
!vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) { !vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT))) {
return; 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 && assert(pixman_image_get_width(vs->vd->server) < 65536 &&
pixman_image_get_width(vs->vd->server) >= 0); pixman_image_get_width(vs->vd->server) >= 0);
@@ -2042,10 +2046,9 @@ static void framebuffer_update_request(VncState *vs, int incremental,
} else { } else {
vs->update = VNC_STATE_UPDATE_FORCE; vs->update = VNC_STATE_UPDATE_FORCE;
vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h); vnc_set_area_dirty(vs->dirty, vs->vd, x, y, w, h);
vnc_colordepth(vs); if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) {
vnc_desktop_resize(vs); vnc_desktop_resize_ext(vs, 0);
vnc_led_state_change(vs); }
vnc_cursor_define(vs);
} }
} }
@@ -2189,7 +2192,10 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
break; break;
} }
} }
vnc_desktop_resize(vs);
check_pointer_type_change(&vs->mouse_mode_notifier, NULL); 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) static void set_pixel_conversion(VncState *vs)