From nobody Tue Feb 10 00:57:38 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=1601373596; cv=none; d=zohomail.com; s=zohoarc; b=NAB5NuX8c+nNguuwl+tMjSmhm1oUgBWcwm/UzPFMd/lMitSILfj2z5pO3ry5MmhJJMbvpoiarrIqa57IcsDE7VYDqmyH6bkINC+fX4fn4BRnhmnDG2JJyD8XkGUTyxIZxXK0CWW48BlNh8sB4sSjoDmN4QjuOzSR8n6ezYvHub8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373596; 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=+aXjCBnVRFvGVFEeIBVm8Fihs/fPIESllo8uMtJcrjo=; b=llBjWOLpwSrnzYnA5VCyuKBKr7TVdw7Hb1pEbw0zVGfW84zNv2vmXw50IJFyhmuUxeOWv1+wUTLtWhMAHIQXhp7vkAi8uo+sbss7PQtsSuMngbwo5hf8sc+E5eipTn/Iz2r9lSp0qaZfAZdHAUuhRD2RyQpRzSSNh2Ptr+9bnoM= 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 1601373596058860.1538497035145; Tue, 29 Sep 2020 02:59:56 -0700 (PDT) Received: from localhost ([::1]:59694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCQL-0005tY-Gz for importer@patchew.org; Tue, 29 Sep 2020 05:59:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCOC-0002xZ-ON for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCOA-0000tG-Sr for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:40 -0400 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-587-z3Y95y0OMXa16qfV5Mnw-Q-1; Tue, 29 Sep 2020 05:57:35 -0400 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 B1F911007283; Tue, 29 Sep 2020 09:57:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 906AE60C84; Tue, 29 Sep 2020 09:57:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BEAB031E21; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373458; 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=+aXjCBnVRFvGVFEeIBVm8Fihs/fPIESllo8uMtJcrjo=; b=R2Q83Ys5d69HckrWnNfPiN2opd5PQEMP27hAjNa4p1ZfeUpu8Jh7GH8RFWzVoZcrlyLLok eMEmE3d2f3LDNy8rELgdhDTbaAEdZhgMTuqinKtpItPCe3wQDKNsg7hYmiD/2+LDyBTMdD kAGm7t4UmdscfkkfY0tEqI39BNUmjys= X-MC-Unique: z3Y95y0OMXa16qfV5Mnw-Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 6/9] spice: get monitors physical dimension Date: Tue, 29 Sep 2020 11:57:14 +0200 Message-Id: <20200929095717.26745-7-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-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-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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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?Marc-Andr=C3=A9=20Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau With upcoming Spice server version 0.14.4, the monitor configuration can contain additional fields for the monitor physical dimensions. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-6-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 +++ ui/spice-display.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index 353d2e49a1b2..e7303d8b98a8 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -119,6 +119,9 @@ typedef struct DisplaySurface { } DisplaySurface; =20 typedef struct QemuUIInfo { + /* physical dimension */ + uint16_t width_mm; + uint16_t height_mm; /* geometry */ int xoff; int yoff; diff --git a/ui/spice-display.c b/ui/spice-display.c index b304c13149a8..0178d5766d2c 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -678,6 +678,13 @@ static int interface_client_monitors_config(QXLInstanc= e *sin, if (mc->num_of_monitors > head) { info.width =3D mc->monitors[head].width; info.height =3D mc->monitors[head].height; +#if SPICE_SERVER_VERSION >=3D 0x000e04 /* release 0.14.4 */ + if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) { + VDAgentMonitorMM *mm =3D (void *)&mc->monitors[mc->num_of_moni= tors]; + info.width_mm =3D mm[head].width; + info.height_mm =3D mm[head].height; + } +#endif } =20 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); --=20 2.27.0