From nobody Mon Feb 9 17:59:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610706394; cv=none; d=zohomail.com; s=zohoarc; b=i0AycqzZ5LfFCDtpvixS6Cba7ttwMm/5ZiCV87ppiIEn1q0AmVlQH89TgzfHvFBNcwFO/1kTg7vaSO0dJ8lMkE8xQd1nNIajTrEdeJtuKzG669eNNmejUHKSsfb/9Bm1TrCQtVF2ebKVcCh8wMSgqgxzYCvNT+u3Qyl+s7sEbtE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610706394; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BBCT3LB6DyJYH8ndCFyzahlXCB0IUum4nKYjrdpVNfE=; b=EX/zpHfzxOV6JoJ7iaCcNt+CDwdSPTtnBeQzAdNsgTG2967a6VrpPxBcvUXl4JW0ls7ArJ92NjXL5C4YcGUn2To6QENrheHmw1fB+Dka0bLGnZG/VAuYkDLhVsyEDPK+iBSIW2XteMbi6tdllLbmHSTOr185qUW8kFPHBfEAzEM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1610706394612439.11806590999197; Fri, 15 Jan 2021 02:26:34 -0800 (PST) Received: from localhost ([::1]:36206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0MJN-0004ip-Gf for importer@patchew.org; Fri, 15 Jan 2021 05:26:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0MHV-0002ws-Kv for qemu-devel@nongnu.org; Fri, 15 Jan 2021 05:24:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l0MHS-0007sS-51 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 05:24:37 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-61-y3MxJq-oNAO9wUrrLseQ_Q-1; Fri, 15 Jan 2021 05:24:31 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0AD7C806668 for ; Fri, 15 Jan 2021 10:24:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C26C719C45; Fri, 15 Jan 2021 10:24:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E9DB41800D40; Fri, 15 Jan 2021 11:24:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610706273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BBCT3LB6DyJYH8ndCFyzahlXCB0IUum4nKYjrdpVNfE=; b=Hpr2ZoXsIaamDBN16kMD0PB4yEkePzWkptGqsHve3FV+12FC7xk9jAD8kNVwDc8hxn1rkO irhsZheYYPhr11GJELkRiXy+jj+dQmo7xz4jozciqLfiZOzNs4T5IXwwrO7NUDDhRcKbbA anBZg/fkGDjz8dx7VNG+tZR3F1YnqcU= X-MC-Unique: y3MxJq-oNAO9wUrrLseQ_Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 10/11] vnc: move initialization to framebuffer_update_request Date: Fri, 15 Jan 2021 11:24:23 +0100 Message-Id: <20210115102424.1360437-11-kraxel@redhat.com> In-Reply-To: <20210115102424.1360437-1-kraxel@redhat.com> References: <20210115102424.1360437-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) qemu sends various state info like current cursor shape to newly connected clients in response to a set_encoding message. This is not correct accordi= ng to the rfb spec. Send that information in response to a full (incremental= =3D0) framebuffer update request instead. Also send the resize information unconditionally, not only in case of an actual server-side change. This makes the qemu vnc server conform to the spec and allows clients to request the complete vnc server state without reconnect. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 Message-id: 20210112134120.2031837-3-kraxel@redhat.com --- ui/vnc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 0f01481cac57..b4e98cf647f5 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -661,10 +661,6 @@ static void vnc_desktop_resize(VncState *vs) if (vs->ioc =3D=3D NULL || !vnc_has_feature(vs, VNC_FEATURE_RESIZE)) { return; } - if (vs->client_width =3D=3D pixman_image_get_width(vs->vd->server) && - vs->client_height =3D=3D pixman_image_get_height(vs->vd->server)) { - return; - } =20 assert(pixman_image_get_width(vs->vd->server) < 65536 && pixman_image_get_width(vs->vd->server) >=3D 0); @@ -2014,6 +2010,10 @@ static void framebuffer_update_request(VncState *vs,= int incremental, } else { vs->update =3D 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); } } =20 @@ -2154,10 +2154,7 @@ static void set_encodings(VncState *vs, int32_t *enc= odings, 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); } =20 static void set_pixel_conversion(VncState *vs) --=20 2.29.2