From nobody Fri May 17 20:33:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611571358; cv=none; d=zohomail.com; s=zohoarc; b=RuSca2Mr9zwpDSnAZmWvv++Lxuo68drwoche7b5jWUNa/38ikSuf7yWaS3iexlFxfBYXFrrP0k498TjcZ9JWQ6n/jIjmlO+QO25OR3H2au45tAW0k0ZHoO+A9ZfytPdxG86ieR8LpIDxYpM4TgpA7g/xBQpCa9vk66LyDhf4EB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611571358; 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=M4wtn3IdGtDyS0l/jFY/TkkgQ5MmuTKZ8UXwdNg25+g=; b=DQWDDL8K3r9LhAVwpsCveUKKSE749NjqXzEW7+3/pphAJaU5SAbpQceSDuc1MCvXdwFtVS7M0/Vv9Blomnl7wEJdXVjagzCTHb5+LWIrO3cNmK8ruz6en4PqgdKIrOAI4Ag2iczSBEb6lccMMkGe20tVuDOOH0dSz8/+Na5ZKlg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1611571358389997.8112692522726; Mon, 25 Jan 2021 02:42:38 -0800 (PST) Received: from localhost ([::1]:55058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3zKP-0007Vr-4w for importer@patchew.org; Mon, 25 Jan 2021 05:42:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3zIj-0006Rc-KS for qemu-devel@nongnu.org; Mon, 25 Jan 2021 05:40:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l3zIf-0002Z2-Q1 for qemu-devel@nongnu.org; Mon, 25 Jan 2021 05:40:53 -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-247-rd-baxQtMde7a5ELi1aedQ-1; Mon, 25 Jan 2021 05:40:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9958F806672 for ; Mon, 25 Jan 2021 10:40:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE2AE10021B3; Mon, 25 Jan 2021 10:40:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 25AA818003B1; Mon, 25 Jan 2021 11:40:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611571248; 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=M4wtn3IdGtDyS0l/jFY/TkkgQ5MmuTKZ8UXwdNg25+g=; b=bHlieG/N2yor7pFedWzaWRJymc/EPBBPFV5AA07WTY4q3JuTkJwFnWl80A2pQY3cKSP2jN aJY3zp8Kgd6ebB6AGc4hwWMNUImf1WFxGAcACFkhalfgyFNW/xDolXKpggtNme4jCwVINA r5TCTnpzPeG+Gddu7dpRd4cHk5ZUQdc= X-MC-Unique: rd-baxQtMde7a5ELi1aedQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 1/2] Revert "vnc: move initialization to framebuffer_update_request" Date: Mon, 25 Jan 2021 11:40:40 +0100 Message-Id: <20210125104041.495274-2-kraxel@redhat.com> In-Reply-To: <20210125104041.495274-1-kraxel@redhat.com> References: <20210125104041.495274-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-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: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This reverts commit 9e1632ad07ca49de99da4bb231e9e2f22f2d8df5. Older gtk-vnc versions can't deal with non-incremental update requests sending pseudo-encodings, so trying to send full server state (including desktop size, cursor etc. which is done using pseudo-encodings) doesn't fly. Return to old behavior to send those only for new connects and when changes happen. Signed-off-by: Gerd Hoffmann Tested-by: Laszlo Ersek --- ui/vnc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 66f7c1b9361e..2622f82a5a9f 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -687,6 +687,10 @@ static void vnc_desktop_resize(VncState *vs) !vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)))= { 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); @@ -2042,10 +2046,6 @@ 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 @@ -2189,7 +2189,10 @@ 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 From nobody Fri May 17 20:33:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611571358; cv=none; d=zohomail.com; s=zohoarc; b=SNs4m29QvFNYhlbiiNwzSA0+8rqRu/41ZxTIyPcWgC358UpDvzNd03+fFAhj/dJ7ztg/hMVaY4DhWOHpZYMx8ywxaNMh4Ywe4ZM1vhStCHUmEGGCkRPnnnF66k/7LTyh5RS0b4JJBFwhs2RYERFM1UAs0O2X51/DJ5Sq2sxAQEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611571358; 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=ggfnDRPx+QhAyq+WV2v+meUBIyhf1mAhF5MxBrI1Vxk=; b=fXBOaYz+gOcTk0ptjMGmBEPqSa9RsuOGbvGiqEzNFSe8lOwe0m4A1zf/lAQNC/fHklbKML60z4h/w/TVvFkuSA1o3FgKfpSwq3elGazKRfJHw3TNZupH6IBLi3fxRfuKjb0CC60SZ1+4PhtTmqJyu7mgU5D1xvfg+mL7mWxuRAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1611571358178563.7479399857344; Mon, 25 Jan 2021 02:42:38 -0800 (PST) Received: from localhost ([::1]:55026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3zKO-0007V6-VI for importer@patchew.org; Mon, 25 Jan 2021 05:42:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3zIh-0006R5-BY for qemu-devel@nongnu.org; Mon, 25 Jan 2021 05:40:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l3zIf-0002Z9-DT for qemu-devel@nongnu.org; Mon, 25 Jan 2021 05:40:51 -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-273-jkOlUsOAN9e1DLGaWAlXeA-1; Mon, 25 Jan 2021 05:40:46 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A8D2FCC625 for ; Mon, 25 Jan 2021 10:40:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABADF60C0F; Mon, 25 Jan 2021 10:40:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2FE6518003B3; Mon, 25 Jan 2021 11:40:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611571248; 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=ggfnDRPx+QhAyq+WV2v+meUBIyhf1mAhF5MxBrI1Vxk=; b=T65NUZen9AFi/0b0N5NYCzMiETFw8q8MFlsKXjtZKM8hlqWMY2UmIdshi/ovdEtviTOR97 Yer5FNgGGvK2S+HIBOEq+ccfFuiBsuwf1gQBqOKKgSkNO2ltABdEqRPsRh2yEI3+N43K8q pgmP5ZVbsBx1OxD4NqEdKgqRAPfOXrg= X-MC-Unique: jkOlUsOAN9e1DLGaWAlXeA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH v2 2/2] vnc: send extended desktop resize on update requests Date: Mon, 25 Jan 2021 11:40:41 +0100 Message-Id: <20210125104041.495274-3-kraxel@redhat.com> In-Reply-To: <20210125104041.495274-1-kraxel@redhat.com> References: <20210125104041.495274-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-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: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Unlike other pseudo-encodings these don't break gtk-vnc because older versions don't suport the extended desktop resize extension in the first place. Signed-off-by: Gerd Hoffmann Tested-by: Laszlo Ersek --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index 2622f82a5a9f..16bb3be770b2 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2046,6 +2046,9 @@ 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); + if (vnc_has_feature(vs, VNC_FEATURE_RESIZE_EXT)) { + vnc_desktop_resize_ext(vs, 0); + } } } =20 --=20 2.29.2