diff mbox series

[3/4] ui: use client width/height in WMVi message

Message ID 20210311182957.486939-4-berrange@redhat.com
State New
Headers show
Series ui: improve precision of VNC desktop resizing | expand

Commit Message

Daniel P. Berrangé March 11, 2021, 6:29 p.m. UTC
The WMVi message is supposed to provide the same width/height
information as the regular desktop resize and extended desktop
resize messages. There can be times where the client width and
height are different from the pixman surface dimensions.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 ui/vnc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Marc-André Lureau March 11, 2021, 9:19 p.m. UTC | #1
On Thu, Mar 11, 2021 at 10:46 PM Daniel P. Berrangé <berrange@redhat.com>
wrote:

> The WMVi message is supposed to provide the same width/height
> information as the regular desktop resize and extended desktop
> resize messages. There can be times where the client width and
> height are different from the pixman surface dimensions.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  ui/vnc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 7291429c04..8c9890b3cd 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -2319,8 +2319,8 @@ static void vnc_colordepth(VncState *vs)
>          vnc_write_u8(vs, 0);
>          vnc_write_u16(vs, 1); /* number of rects */
>          vnc_framebuffer_update(vs, 0, 0,
> -                               pixman_image_get_width(vs->vd->server),
> -                               pixman_image_get_height(vs->vd->server),
> +                               vs->client_width,
> +                               vs->client_height,
>                                 VNC_ENCODING_WMVi);
>          pixel_format_message(vs);
>          vnc_unlock_output(vs);
> --
> 2.29.2
>
>
>
diff mbox series

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index 7291429c04..8c9890b3cd 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2319,8 +2319,8 @@  static void vnc_colordepth(VncState *vs)
         vnc_write_u8(vs, 0);
         vnc_write_u16(vs, 1); /* number of rects */
         vnc_framebuffer_update(vs, 0, 0,
-                               pixman_image_get_width(vs->vd->server),
-                               pixman_image_get_height(vs->vd->server),
+                               vs->client_width,
+                               vs->client_height,
                                VNC_ENCODING_WMVi);
         pixel_format_message(vs);
         vnc_unlock_output(vs);