[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/9] vnc: force initial resize message
From: |
Gerd Hoffmann |
Subject: |
[PATCH v2 7/9] vnc: force initial resize message |
Date: |
Tue, 8 Dec 2020 12:57:35 +0100 |
The vnc server should send desktop resize notifications unconditionally
on a new client connect, for feature negotiation reasons. Add a bool
flag to vnc_desktop_resize() to force sending the message even in case
there is no size change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/vnc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 247e80d8f5c8..bdaf384f71a4 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -664,13 +664,14 @@ void vnc_framebuffer_update(VncState *vs, int x, int y,
int w, int h,
}
-static void vnc_desktop_resize(VncState *vs)
+static void vnc_desktop_resize(VncState *vs, bool force)
{
if (vs->ioc == NULL || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) {
return;
}
if (vs->client_width == pixman_image_get_width(vs->vd->server) &&
- vs->client_height == pixman_image_get_height(vs->vd->server)) {
+ vs->client_height == pixman_image_get_height(vs->vd->server) &&
+ !force) {
return;
}
@@ -800,7 +801,7 @@ static void vnc_dpy_switch(DisplayChangeListener *dcl,
QTAILQ_FOREACH(vs, &vd->clients, next) {
vnc_colordepth(vs);
- vnc_desktop_resize(vs);
+ vnc_desktop_resize(vs, false);
if (vs->vd->cursor) {
vnc_cursor_define(vs);
}
@@ -2143,7 +2144,7 @@ static void set_encodings(VncState *vs, int32_t
*encodings, size_t n_encodings)
break;
}
}
- vnc_desktop_resize(vs);
+ vnc_desktop_resize(vs, true);
check_pointer_type_change(&vs->mouse_mode_notifier, NULL);
vnc_led_state_change(vs);
if (vs->vd->cursor) {
--
2.27.0
- [PATCH v2 0/9] vnc: support some new extensions., Gerd Hoffmann, 2020/12/08
- [PATCH v2 2/9] console: allow con==NULL in dpy_{get, set}_ui_info and dpy_ui_info_supported, Gerd Hoffmann, 2020/12/08
- [PATCH v2 1/9] console: drop qemu_console_get_ui_info, Gerd Hoffmann, 2020/12/08
- [PATCH v2 4/9] vnc: drop unused copyrect feature, Gerd Hoffmann, 2020/12/08
- [PATCH v2 9/9] vnc: move check into vnc_cursor_define, Gerd Hoffmann, 2020/12/08
- [PATCH v2 7/9] vnc: force initial resize message,
Gerd Hoffmann <=
- [PATCH v2 8/9] vnc: add support for extended desktop resize, Gerd Hoffmann, 2020/12/08
[PATCH v2 3/9] vnc: use enum for features, Gerd Hoffmann, 2020/12/08
[PATCH v2 6/9] vnc: add alpha cursor support, Gerd Hoffmann, 2020/12/08
[PATCH v2 5/9] vnc: add pseudo encodings, Gerd Hoffmann, 2020/12/08