From nobody Mon May 13 17:05:57 2024 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=1613772183; cv=none; d=zohomail.com; s=zohoarc; b=EsY/86DA285GSO5+Vj2GTOhKLDN46i3CAUakYW9X1zR4wQY07diY/AWAqw7G43lGLWsi8EhSyoz4VYIb4D1lPI/R30bxsxeopEtt1/rVJZXC9Nm1K4TtuDlZNvRFmwCOd+0PXDkhNK18tEcVcpG9rrfoMjJsi0bNUi6wx5bhqnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772183; 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=ytlRzGU7yo3Dj5Jjb15C/C5CzEpw7ejlHjj6/k5BTAk=; b=nakZn2ezAIXbhURXqDzDLMd6kTRG8CoBwZl6HuGyuNh7QuWOLMNrxlJZbj+ZikbD2dmPOdHg6NKQRZ189v0+7hix4tJ96go1NP8aIJTDklNcuwWdrXd4veEfClZ6kJVzDwvBGSLHsZO+lCE9Lwzg1/N0d/EKJg4Dkdqhhmbf2uQ= 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 1613772183569457.9928981192302; Fri, 19 Feb 2021 14:03:03 -0800 (PST) Received: from localhost ([::1]:41784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDra-0005qc-DD for importer@patchew.org; Fri, 19 Feb 2021 17:03:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpU-0003TK-7y for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:26558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpR-0005dh-96 for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00: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-204-xInW-xbDPhKgEEMYSyEJXA-1; Fri, 19 Feb 2021 17:00:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A35C6803648; Fri, 19 Feb 2021 22:00:44 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 771426EF55; Fri, 19 Feb 2021 22:00:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DF35F18000B6; Fri, 19 Feb 2021 23:00:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772048; 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=ytlRzGU7yo3Dj5Jjb15C/C5CzEpw7ejlHjj6/k5BTAk=; b=ZIvwyx0X7fXwarDuXHIDQsbuEixox/TTAScoWwpFPBjg5j/WgaiUAjyFD7QshmmuHJBcJm xBHNp6Sloyu3mDVDfIMc0QIjl27yzVTPkcdNDm5ARBSUpG1BPjDlYx5R++PZbFM/fGm1Kq At2/fG7ntAfaWnfEvUMcmSeVdcAoDhE= X-MC-Unique: xInW-xbDPhKgEEMYSyEJXA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 1/8] spice: flush on GL update before notifying client Date: Fri, 19 Feb 2021 23:00:29 +0100 Message-Id: <20210219220036.100654-2-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 Since the introduction of spice/virgl support in commit 474114b7 ("spice: add opengl/virgl/dmabuf support"), the drawing isn't being flushed before notifying the client. This results in outdated/sluggish drawing on client side, in particular when using the Linux console. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210216092056.2301293-1-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index 6f32b66a6e75..d562c6408405 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1087,6 +1087,7 @@ static void qemu_spice_gl_update(DisplayChangeListene= r *dcl, =20 trace_qemu_spice_gl_update(ssd->qxl.id, w, h, x, y); qemu_spice_gl_block(ssd, true); + glFlush(); cookie =3D (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_GL_DRAW_DONE, 0); spice_qxl_gl_draw_async(&ssd->qxl, x, y, w, h, cookie); } --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772287; cv=none; d=zohomail.com; s=zohoarc; b=inqwTcXPth6MGII9ri6FhuA2kLLyv/3OfVHXWeADv28ws1Rg0JPdP8Zwz/e7EKpMJGlxGEGOX6PRIQ4NTDoBMG82xH0ws0UOgbUavZysy/EGIkPNHNE4rSHKmxSWFSNAe8+jQjdRMUoI3t7TjzYruac/GuQH04sbj6jt2CL3LpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772287; 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=eadWhEmickV3NikDQTJXkqhA79lCq6TEJpOjAGb4OPQ=; b=T9TmC6BuirIfQ3STWZzaexRAAg1/8PJ/OTfr+cLc10YgcDG4aG+Qn8K/oZ6+97R+QRpTYdCiZQ3BeC8OAuCyr88nPiGsVUk7zn/odEnrWWndadT8SebUArSpAtgvwapQIGAm0o2Qq8FdDKkUvmdjrTPUx5kNbX/Lo/aJ8hruDPI= 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 1613772287067713.4701560371448; Fri, 19 Feb 2021 14:04:47 -0800 (PST) Received: from localhost ([::1]:49070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDtG-00010D-0P for importer@patchew.org; Fri, 19 Feb 2021 17:04:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpT-0003Ql-GB for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpR-0005df-6U for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:50 -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-236-Qr-5lEHaOPeXI73aVK6dPA-1; Fri, 19 Feb 2021 17:00:45 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 087F11020C21; Fri, 19 Feb 2021 22:00:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7820D5D9C6; Fri, 19 Feb 2021 22:00:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E9F151800396; Fri, 19 Feb 2021 23:00:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772048; 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=eadWhEmickV3NikDQTJXkqhA79lCq6TEJpOjAGb4OPQ=; b=FT8qJwApSVYydv32bDOU2iaJ7XlXh/Dkw3rvR7zuMDPsH2woSIi9769qFsOvHRUGZ95hQ6 32abSodhAfUuIfQMIlXy22eNgeF/bVi+LAtpJNs8TZGzdFmGykbG2VsZMt/LyhiHwtdaZo ZPKgPgEOzH7xH3YrJi3HxTZ7FnYlpxI= X-MC-Unique: Qr-5lEHaOPeXI73aVK6dPA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/8] spice: flush drawing before notifying client Date: Fri, 19 Feb 2021 23:00:30 +0100 Message-Id: <20210219220036.100654-3-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 This solves the client having slow/outdated VGA/2D console. It's a regression introduced when the code was switched to render it via opengl in commit 4423184376d ("spice/gl: render DisplaySurface via opengl") Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210216092056.2301293-2-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index d562c6408405..ad93b953a90c 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -846,6 +846,7 @@ static void spice_gl_refresh(DisplayChangeListener *dcl) graphic_hw_update(dcl->con); if (ssd->gl_updates && ssd->have_surface) { qemu_spice_gl_block(ssd, true); + glFlush(); cookie =3D (uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_GL_DRAW_DONE,= 0); spice_qxl_gl_draw_async(&ssd->qxl, 0, 0, surface_width(ssd->ds), --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772510; cv=none; d=zohomail.com; s=zohoarc; b=iO5B9Dw8GnxP/xujdicVE850TfZzTZ7SHhPz7nR8AafSy+bte+ux1ihYva4SRiePLGNpecs6pOH5Gn+e33HOwLjDLYp98T0aQThQe+VJdGTT/hw9Ywtsy8ceecoII9BgXM2JZ6pEQxJlpBWYW7ne7iL73g2M8ZXlaSpy/A0BzhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772510; 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=6ji6Ud/Z1JR/xpNRHVTli7SYXTNPt/2RyJG0ogwAWUI=; b=Zai0fG3uZnr0m9QvxXpXeVpWWlN1dRJFyslIRCR4p4tGhlnc9PuK79j7CYjbcd+U/aFU6JYslgL9r5tBS5s6D8EPyIrmkv0FuPTeXJDNnq+FWhxuWWsVl0hzAF8ReaS1LK7DzNCyexXhrNCa5nlFxrSDqZb3zQMkPedndC2wr/U= 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 1613772509827288.35907512165977; Fri, 19 Feb 2021 14:08:29 -0800 (PST) Received: from localhost ([::1]:58942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDwq-0005fr-NT for importer@patchew.org; Fri, 19 Feb 2021 17:08:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpP-0003K6-PK for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:54476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpN-0005cr-Mp for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:47 -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-414-Lc3ZFUJQNfWy7CdKy9waqA-1; Fri, 19 Feb 2021 17:00:42 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E64E9803648; Fri, 19 Feb 2021 22:00:41 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79EBF5D723; Fri, 19 Feb 2021 22:00:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 009D11800398; Fri, 19 Feb 2021 23:00:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772044; 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=6ji6Ud/Z1JR/xpNRHVTli7SYXTNPt/2RyJG0ogwAWUI=; b=BXXsNnTtFfhMPf93e20dkaKz1W2Z0eJS83oh2NoBRi0dqH0igdmM+ybXuElt3alTSAZBGF YGHuCbTTElcP/ExXvJEocRu+EL4KER0Wd7ggvHtCkJg9bx3y8kmtbOTopok+jleZvi7MMh 0c83rIcJkks3zuNkj43R/fuYcYRvT+M= X-MC-Unique: Lc3ZFUJQNfWy7CdKy9waqA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 3/8] ui/cocoa: Support unique keys of JIS keyboards Date: Fri, 19 Feb 2021 23:00:31 +0100 Message-Id: <20210219220036.100654-4-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20210212000404.28413-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 13fba8103e1a..78fcfeaf04b7 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -240,6 +240,13 @@ const int mac_to_qkeycode_map[] =3D { [kVK_F14] =3D Q_KEY_CODE_SCROLL_LOCK, [kVK_F15] =3D Q_KEY_CODE_PAUSE, =20 + // JIS keyboards only + [kVK_JIS_Yen] =3D Q_KEY_CODE_YEN, + [kVK_JIS_Underscore] =3D Q_KEY_CODE_RO, + [kVK_JIS_KeypadComma] =3D Q_KEY_CODE_KP_COMMA, + [kVK_JIS_Eisu] =3D Q_KEY_CODE_MUHENKAN, + [kVK_JIS_Kana] =3D Q_KEY_CODE_HENKAN, + /* * The eject and volume keys can't be used here because they are handl= ed at * a lower level than what an Application can see. --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772183; cv=none; d=zohomail.com; s=zohoarc; b=T8zQRGvy3tSWPjwb4ePwVT1NojSjZjwedXonsT2FkfIT3szZu2SRlYtWiGCAJEggfjsMuQ/NikmydddAtnQDRSBCdoIVM8Hfdpyi+VzJV2fibnkqcbTzx9f9XeauqLB/6unN3Bdw44veD7lYyiTj4oDDH4s7bJM/RBYn2VOI3F8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772183; 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=SbBF4z1OU7/9kQcgZz3PdrDuycOQV8ktg8vHjTykT0U=; b=HFnwLg8lJ1lspvaAcDsgQjaGrkwMBEsvK0W+P/vBlh7mZTqHQa/2tMHcaPymg7UWwnRZKLy7Ursdhh2Qo6bspp5w7pKlP7PrjOmMd0/glDfZfLshQdir4ouFG8pLG1hu5ahje+pPUjwAn/iIbqvVVudz77Gj6aWiUxakk6Zyf1s= 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 1613772182725666.6987939260493; Fri, 19 Feb 2021 14:03:02 -0800 (PST) Received: from localhost ([::1]:41620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDrZ-0005k2-Hw for importer@patchew.org; Fri, 19 Feb 2021 17:03:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpR-0003Ms-5b for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpO-0005cx-K9 for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:48 -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-297-P-Sb_RtqP7e1dwTUYMws-g-1; Fri, 19 Feb 2021 17:00:42 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB62C107ACE4; Fri, 19 Feb 2021 22:00:41 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A2B86F989; Fri, 19 Feb 2021 22:00:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0C8151800863; Fri, 19 Feb 2021 23:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772045; 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=SbBF4z1OU7/9kQcgZz3PdrDuycOQV8ktg8vHjTykT0U=; b=YV4oMeZzN9iuX8+fldD67e0SCbybB44a1GRnXQc4+piClP8MvIj1NpHhSGYY1ALxKgTuz0 qfzv6AUGKH8PQxzcNLPYZmwgL7aPV7BEhO3QyvAQTlP9ahZLuwUVLxW65ff+dRW7jNIFwD F5KKTZwygScIoJDuNw8PVRo1kluirhg= X-MC-Unique: P-Sb_RtqP7e1dwTUYMws-g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 4/8] ui/cocoa: Do not copy members of pixman image Date: Fri, 19 Feb 2021 23:00:32 +0100 Message-Id: <20210219220036.100654-5-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: -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.001, 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: Peter Maydell , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki The old CocoaView had an idea of synchronizing the host window configuration and the guest screen configuration. Here, the guest screen actually means pixman image given ui/cocoa display implementation. However, [CocoaView -drawRect:] directly interacts with the pixman image buffer in reality. There is no such distinction of "host" and "guest." This change removes the "host" configuration and let drawRect consistently have the direct reference to pixman image. It allows to get rid of the error-prone "sync" and reduce code size a bit. Signed-off-by: Akihiko Odaki Message-Id: <20210212000629.28551-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 78fcfeaf04b7..eab4bfe7c8ae 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -70,8 +70,6 @@ typedef struct { int width; int height; - int bitsPerComponent; - int bitsPerPixel; } QEMUScreen; =20 NSWindow *normalWindow, *about_window; @@ -291,7 +289,6 @@ static void handleAnyDeviceErrors(Error * err) QEMUScreen screen; NSWindow *fullScreenWindow; float cx,cy,cw,ch,cdx,cdy; - CGDataProviderRef dataProviderRef; pixman_image_t *pixman_image; BOOL modifiers_state[256]; BOOL isMouseGrabbed; @@ -338,8 +335,6 @@ QemuCocoaView *cocoaView; self =3D [super initWithFrame:frameRect]; if (self) { =20 - screen.bitsPerComponent =3D 8; - screen.bitsPerPixel =3D 32; screen.width =3D frameRect.size.width; screen.height =3D frameRect.size.height; =20 @@ -351,8 +346,7 @@ QemuCocoaView *cocoaView; { COCOA_DEBUG("QemuCocoaView: dealloc\n"); =20 - if (dataProviderRef) { - CGDataProviderRelease(dataProviderRef); + if (pixman_image) { pixman_image_unref(pixman_image); } =20 @@ -431,18 +425,28 @@ QemuCocoaView *cocoaView; CGContextSetShouldAntialias (viewContextRef, NO); =20 // draw screen bitmap directly to Core Graphics context - if (!dataProviderRef) { + if (!pixman_image) { // Draw request before any guest device has set up a framebuffer: // just draw an opaque black rectangle CGContextSetRGBFillColor(viewContextRef, 0, 0, 0, 1.0); CGContextFillRect(viewContextRef, NSRectToCGRect(rect)); } else { + int w =3D pixman_image_get_width(pixman_image); + int h =3D pixman_image_get_height(pixman_image); + int bitsPerPixel =3D PIXMAN_FORMAT_BPP(pixman_image_get_format(pix= man_image)); + int bitsPerComponent =3D DIV_ROUND_UP(bitsPerPixel, 8) * 2; + CGDataProviderRef dataProviderRef =3D CGDataProviderCreateWithData( + NULL, + pixman_image_get_data(pixman_image), + w * 4 * h, + NULL + ); CGImageRef imageRef =3D CGImageCreate( - screen.width, //width - screen.height, //height - screen.bitsPerComponent, //bitsPerComponent - screen.bitsPerPixel, //bitsPerPixel - (screen.width * (screen.bitsPerComponent/2)), //bytesPerRow + w, //width + h, //height + bitsPerComponent, //bitsPerComponent + bitsPerPixel, //bitsPerPixel + (w * (bitsPerComponent/2)), //bytesPerRow #ifdef __LITTLE_ENDIAN__ CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), //colorsp= ace for OS X >=3D 10.4 kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, @@ -465,7 +469,7 @@ QemuCocoaView *cocoaView; [self getRectsBeingDrawn:&rectList count:&rectCount]; for (i =3D 0; i < rectCount; i++) { clipRect.origin.x =3D rectList[i].origin.x / cdx; - clipRect.origin.y =3D (float)screen.height - (rectList[i].orig= in.y + rectList[i].size.height) / cdy; + clipRect.origin.y =3D (float)h - (rectList[i].origin.y + rectL= ist[i].size.height) / cdy; clipRect.size.width =3D rectList[i].size.width / cdx; clipRect.size.height =3D rectList[i].size.height / cdy; clipImageRef =3D CGImageCreateWithImageInRect( @@ -476,6 +480,7 @@ QemuCocoaView *cocoaView; CGImageRelease (clipImageRef); } CGImageRelease (imageRef); + CGDataProviderRelease(dataProviderRef); } } =20 @@ -518,7 +523,6 @@ QemuCocoaView *cocoaView; =20 int w =3D pixman_image_get_width(image); int h =3D pixman_image_get_height(image); - pixman_format_code_t image_format =3D pixman_image_get_format(image); /* cdx =3D=3D 0 means this is our very first surface, in which case we= need * to recalculate the content dimensions even if it happens to be the = size * of the initial empty window. @@ -536,17 +540,11 @@ QemuCocoaView *cocoaView; } =20 // update screenBuffer - if (dataProviderRef) { - CGDataProviderRelease(dataProviderRef); + if (pixman_image) { pixman_image_unref(pixman_image); } =20 - //sync host window color space with guests - screen.bitsPerPixel =3D PIXMAN_FORMAT_BPP(image_format); - screen.bitsPerComponent =3D DIV_ROUND_UP(screen.bitsPerPixel, 8) * 2; - pixman_image =3D image; - dataProviderRef =3D CGDataProviderCreateWithData(NULL, pixman_image_ge= t_data(image), w * 4 * h, NULL); =20 // update windows if (isFullscreen) { --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772511; cv=none; d=zohomail.com; s=zohoarc; b=BfP6qkD+Zc2IXrtyTbGpWtNlr2wm/qkCcDc46DSGFwGP25hCo9zdbHnqFc9CNTfqi9qpCL/XmwW9xLaMr3yRDfrCuCqQIVptYtbFk0o9bBaVBz+2IupiJUrU58eCpacMaRGfq28/VKiZELGMQQpEW7pk1hjfksLQlCEdMdJ5YM4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772511; 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=kfXPLOFRyc3TekUGGzF9HARVFfnCWS05mTmnQHE6c+A=; b=EqHt+DVTIHaNmoOQFNmgidUn/VA0YJjRrQVPDTZsMHnxc91+TCoap2CUIje3sQ9ev6pfVS69DKOZcrWlBFZDPKoYosqMYlZsCha2lNtHVaECIJwySVw2omYacGsMan32qwasCKliU6YS8DM9JQuwFBPoYkOzmt4CiwX/6r9ZQTk= 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 1613772511473782.69404452284; Fri, 19 Feb 2021 14:08:31 -0800 (PST) Received: from localhost ([::1]:59098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDws-0005jc-Fm for importer@patchew.org; Fri, 19 Feb 2021 17:08:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpc-0003lh-FL for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:01:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpa-0005hZ-CG for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:01:00 -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-416-DEpm8Y_fMK2GKmkYixCvBg-1; Fri, 19 Feb 2021 17:00:53 -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 EE44D801965; Fri, 19 Feb 2021 22:00:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6121060BFA; Fri, 19 Feb 2021 22:00:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 17B8C1800864; Fri, 19 Feb 2021 23:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772057; 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=kfXPLOFRyc3TekUGGzF9HARVFfnCWS05mTmnQHE6c+A=; b=FDPwhqEfCWHmwm/Kwu2kQqZpOzBr/Gqsc0y2lXegvTNEftyjDy9E4RtzqQ/troU/DaHKIM 4d3kACN8A+6UfoajvGm909wtnMfi0zQEmiagDn8Y9rPZ9ThqITee/GdmlEzSgxG8TlI36v 9T4pF+JuQguXGu6hckyhmkZcmedJoSE= X-MC-Unique: DEpm8Y_fMK2GKmkYixCvBg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 5/8] spice-app: avoid crash when core spice module doesn't loaded Date: Fri, 19 Feb 2021 23:00:33 +0100 Message-Id: <20210219220036.100654-6-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Bruce Rogers Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Bruce Rogers When qemu is built with modules, but a given module doesn't load qemu should handle that gracefully. When ui-spice-core.so isn't able to be loaded and qemu is invoked with -display spice-app or -spice, qemu will dereference a null pointer. With this change we check the pointer before dereferencing and error out in a normal way. Signed-off-by: Bruce Rogers Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210213032318.346093-1-brogers@suse.com> Signed-off-by: Gerd Hoffmann --- ui/spice-app.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/spice-app.c b/ui/spice-app.c index 026124ef56a0..4325ac2d9c54 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -129,6 +129,7 @@ static void spice_app_atexit(void) static void spice_app_display_early_init(DisplayOptions *opts) { QemuOpts *qopts; + QemuOptsList *list; GError *err =3D NULL; =20 if (opts->has_full_screen) { @@ -159,11 +160,16 @@ static void spice_app_display_early_init(DisplayOptio= ns *opts) exit(1); } } + list =3D qemu_find_opts("spice"); + if (list =3D=3D NULL) { + error_report("spice-app missing spice support"); + exit(1); + } =20 type_register(&char_vc_type_info); =20 sock_path =3D g_strjoin("", app_dir, "/", "spice.sock", NULL); - qopts =3D qemu_opts_create(qemu_find_opts("spice"), NULL, 0, &error_ab= ort); + qopts =3D qemu_opts_create(list, NULL, 0, &error_abort); qemu_opt_set(qopts, "disable-ticketing", "on", &error_abort); qemu_opt_set(qopts, "unix", "on", &error_abort); qemu_opt_set(qopts, "addr", sock_path, &error_abort); --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772372; cv=none; d=zohomail.com; s=zohoarc; b=YtS2bXScWiwTQoeSwXJSOByYAY+wyicpD/8tbKamBtWqiEFBD274xK080+1nYAVdCc/Po0+Z/FnRB8ptd+QEgcfa83f6UYPPWxvhcHZoPsoSMX6rJstZaJCaZEjZyKvNh3gEhXSLn2mM6pJWjNW3QtA/kENkOa8JWYZF2qgaJvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772372; 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=FY/v2o2noH2hc8pJasCo9MJtYfBIC0/wztgrsg5w2N0=; b=RaZ7/nc8FeDgRyAIdXpiAF3MYT2vGU7p+tEFqpyFal17RVjEbuty2vGrBk27mF/c4/wjKnc2RlCSSSoqasGBzZWRlZD0m2FDMEls3v1VL/2QwTgxQzLo/0j/uP+2y3Fu/rtVxPvq2KWWc6MVdvHfZAszdOc0Sis0hBpeBamBbEM= 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 1613772371614126.94921354609608; Fri, 19 Feb 2021 14:06:11 -0800 (PST) Received: from localhost ([::1]:53312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDuc-0002nP-J8 for importer@patchew.org; Fri, 19 Feb 2021 17:06:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpX-0003bC-MN for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:54068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpU-0005f7-82 for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:55 -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-310-UzQPP2VrMsaoanoSNg3hLA-1; Fri, 19 Feb 2021 17:00:47 -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 BE5841020C20; Fri, 19 Feb 2021 22:00:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 607DD1A875; Fri, 19 Feb 2021 22:00:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 229631800865; Fri, 19 Feb 2021 23:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772051; 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=FY/v2o2noH2hc8pJasCo9MJtYfBIC0/wztgrsg5w2N0=; b=ZpnQtBrSvvAGR6mrYb0sH+3BggTw0uoXMg/elf1R/0jMev5OCozpAGvARdJRSVtfpyQHMT uFN16MlNecgvrPxzNWGBD+UGwshWmFomGF/z7mJ9rZc9K2ck3quvyCN+sx1EcnjFu2UvOz AsVML+xxN9/bLLZwcHxSPe9tWBb6lnc= X-MC-Unique: UzQPP2VrMsaoanoSNg3hLA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 6/8] ui/cocoa: Interpret left button down as is when command is pressed Date: Fri, 19 Feb 2021 23:00:34 +0100 Message-Id: <20210219220036.100654-7-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-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-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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Old Macs were not equipped with mice with an ability to perform "right clicks" and ui/cocoa interpreted left button down with left command key pressed as right button down as a workaround. The workaround has an obvious downside: you cannot tell the guest that the left button is down while the left command key is pressed. Today, Macs has trackpads, Apple Mice, or Magic Mice. They are capable to emulate right clicks with gestures, which also allows to perform right clicks on "BootCamp" OSes like Windows. By removing the workaround, we overcome its downside, and provide a behavior consistent with BootCamp. Signed-off-by: Akihiko Odaki Message-Id: <20210212000706.28616-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index eab4bfe7c8ae..13f19bece14d 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -835,11 +835,7 @@ QemuCocoaView *cocoaView; mouse_event =3D true; break; case NSEventTypeLeftMouseDown: - if ([event modifierFlags] & NSEventModifierFlagCommand) { - buttons |=3D MOUSE_EVENT_RBUTTON; - } else { - buttons |=3D MOUSE_EVENT_LBUTTON; - } + buttons |=3D MOUSE_EVENT_LBUTTON; mouse_event =3D true; break; case NSEventTypeRightMouseDown: @@ -851,11 +847,7 @@ QemuCocoaView *cocoaView; mouse_event =3D true; break; case NSEventTypeLeftMouseDragged: - if ([event modifierFlags] & NSEventModifierFlagCommand) { - buttons |=3D MOUSE_EVENT_RBUTTON; - } else { - buttons |=3D MOUSE_EVENT_LBUTTON; - } + buttons |=3D MOUSE_EVENT_LBUTTON; mouse_event =3D true; break; case NSEventTypeRightMouseDragged: --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772300; cv=none; d=zohomail.com; s=zohoarc; b=ZJLDRinW6O8bz/c7PJqJdQnuqfLvnQ0YZ/8oFhhGBviAQ5Ac6I7CzMeRSay+6wbiQbepldA1kguNx2TbAQAbvHVM3J/qT79ktP5Ylm3b07UH4aLGPl7wo97X3+7IrB3CvAuyE0sFb5lcRy9Vhnel7UdjaeCVssgQpnu9hsG10ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772300; 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=TARjO2/fwKd29LGUq4b17AVZp5xI25cUkMSXVN3aIr8=; b=E8n4C0Hrxo+VGQn7aRDqpEN9SGxbAajXiSeCmWZybHzoD0Fb2isKLTu2HNSIDG1z9uY72EeilPYB1sfCPUN/H90asfonXIy8etjIiN08njuVuokwAga/koOc+YIXsMc3t9O2x6NtKWxHdfmOB0M8c2GVOa1HTQVBBVZ5vhJvxr8= 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 161377229976048.991932643102245; Fri, 19 Feb 2021 14:04:59 -0800 (PST) Received: from localhost ([::1]:50334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDtS-0001Vi-LQ for importer@patchew.org; Fri, 19 Feb 2021 17:04:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpV-0003X7-OD for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:40360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpS-0005en-Tf for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00: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-568-KTZqHNHJN7C-KQwsVphzcg-1; Fri, 19 Feb 2021 17:00:48 -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 ED01C803648; Fri, 19 Feb 2021 22:00:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FEFF1A49B; Fri, 19 Feb 2021 22:00:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2E9111800866; Fri, 19 Feb 2021 23:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772050; 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=TARjO2/fwKd29LGUq4b17AVZp5xI25cUkMSXVN3aIr8=; b=C8leXi0vgILsYrdURVivjJ56dy1v6Qc7UjkS8aQp1osla/KKl6Cb2VY7rbcmWudT81/vGq xl1gE3TZnpsbzcqAAqJHl7CjjVAKm3OfR2lKAUxpjG/5n8x9F8w7F2mxhqZnfjqTRE0K4W 1nW9YLQTe2Drb8ED5+huHlnjd/0noHI= X-MC-Unique: KTZqHNHJN7C-KQwsVphzcg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 7/8] ui/cocoa: Statically allocate dcl Date: Fri, 19 Feb 2021 23:00:35 +0100 Message-Id: <20210219220036.100654-8-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-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-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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com 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.001, 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_H4=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: Peter Maydell , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki There is no need of dynamic allocation as dcl is a small singleton. Static allocation reduces code size and makes hacking with ui/cocoa a bit easier. Signed-off-by: Akihiko Odaki Message-Id: <20210219084419.90181-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 65 ++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 13f19bece14d..0ef5fdf3b7a3 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -72,8 +72,24 @@ typedef struct { int height; } QEMUScreen; =20 +static void cocoa_update(DisplayChangeListener *dcl, + int x, int y, int w, int h); + +static void cocoa_switch(DisplayChangeListener *dcl, + DisplaySurface *surface); + +static void cocoa_refresh(DisplayChangeListener *dcl); + NSWindow *normalWindow, *about_window; -static DisplayChangeListener *dcl; +static const DisplayChangeListenerOps dcl_ops =3D { + .dpy_name =3D "cocoa", + .dpy_gfx_update =3D cocoa_update, + .dpy_gfx_switch =3D cocoa_switch, + .dpy_refresh =3D cocoa_refresh, +}; +static DisplayChangeListener dcl =3D { + .ops =3D &dcl_ops, +}; static int last_buttons; static int cursor_hide =3D 1; =20 @@ -607,15 +623,15 @@ QemuCocoaView *cocoaView; // Toggle the stored state. modifiers_state[keycode] =3D !modifiers_state[keycode]; // Send a keyup or keydown depending on the state. - qemu_input_event_send_key_qcode(dcl->con, keycode, modifiers_state[key= code]); + qemu_input_event_send_key_qcode(dcl.con, keycode, modifiers_state[keyc= ode]); } =20 - (void) toggleStatefulModifier: (int)keycode { // Toggle the stored state. modifiers_state[keycode] =3D !modifiers_state[keycode]; // Generate keydown and keyup. - qemu_input_event_send_key_qcode(dcl->con, keycode, true); - qemu_input_event_send_key_qcode(dcl->con, keycode, false); + qemu_input_event_send_key_qcode(dcl.con, keycode, true); + qemu_input_event_send_key_qcode(dcl.con, keycode, false); } =20 // Does the work of sending input to the monitor @@ -799,7 +815,7 @@ QemuCocoaView *cocoaView; } =20 if (qemu_console_is_graphic(NULL)) { - qemu_input_event_send_key_qcode(dcl->con, keycode, true); + qemu_input_event_send_key_qcode(dcl.con, keycode, true); } else { [self handleMonitorInput: event]; } @@ -814,7 +830,7 @@ QemuCocoaView *cocoaView; } =20 if (qemu_console_is_graphic(NULL)) { - qemu_input_event_send_key_qcode(dcl->con, keycode, false); + qemu_input_event_send_key_qcode(dcl.con, keycode, false); } break; case NSEventTypeMouseMoved: @@ -892,9 +908,9 @@ QemuCocoaView *cocoaView; /* Determine if this is a scroll up or scroll down event */ buttons =3D ([event deltaY] > 0) ? INPUT_BUTTON_WHEEL_UP : INPUT_BUTTON_WHEEL_DOWN; - qemu_input_queue_btn(dcl->con, buttons, true); + qemu_input_queue_btn(dcl.con, buttons, true); qemu_input_event_sync(); - qemu_input_queue_btn(dcl->con, buttons, false); + qemu_input_queue_btn(dcl.con, buttons, false); qemu_input_event_sync(); } /* @@ -922,7 +938,7 @@ QemuCocoaView *cocoaView; [INPUT_BUTTON_MIDDLE] =3D MOUSE_EVENT_MBUTTON, [INPUT_BUTTON_RIGHT] =3D MOUSE_EVENT_RBUTTON }; - qemu_input_update_buttons(dcl->con, bmap, last_buttons, button= s); + qemu_input_update_buttons(dcl.con, bmap, last_buttons, buttons= ); last_buttons =3D buttons; } if (isMouseGrabbed) { @@ -932,12 +948,12 @@ QemuCocoaView *cocoaView; * clicks in the titlebar. */ if ([self screenContainsPoint:p]) { - qemu_input_queue_abs(dcl->con, INPUT_AXIS_X, p.x, 0, s= creen.width); - qemu_input_queue_abs(dcl->con, INPUT_AXIS_Y, screen.he= ight - p.y, 0, screen.height); + qemu_input_queue_abs(dcl.con, INPUT_AXIS_X, p.x, 0, sc= reen.width); + qemu_input_queue_abs(dcl.con, INPUT_AXIS_Y, screen.hei= ght - p.y, 0, screen.height); } } else { - qemu_input_queue_rel(dcl->con, INPUT_AXIS_X, (int)[event d= eltaX]); - qemu_input_queue_rel(dcl->con, INPUT_AXIS_Y, (int)[event d= eltaY]); + qemu_input_queue_rel(dcl.con, INPUT_AXIS_X, (int)[event de= ltaX]); + qemu_input_queue_rel(dcl.con, INPUT_AXIS_Y, (int)[event de= ltaY]); } } else { return false; @@ -1006,7 +1022,7 @@ QemuCocoaView *cocoaView; for (index =3D 0; index < max_index; index++) { if (modifiers_state[index]) { modifiers_state[index] =3D 0; - qemu_input_event_send_key_qcode(dcl->con, index, false); + qemu_input_event_send_key_qcode(dcl.con, index, false); } } }); @@ -1833,19 +1849,6 @@ static void cocoa_refresh(DisplayChangeListener *dcl) [pool release]; } =20 -static void cocoa_cleanup(void) -{ - COCOA_DEBUG("qemu_cocoa: cocoa_cleanup\n"); - g_free(dcl); -} - -static const DisplayChangeListenerOps dcl_ops =3D { - .dpy_name =3D "cocoa", - .dpy_gfx_update =3D cocoa_update, - .dpy_gfx_switch =3D cocoa_switch, - .dpy_refresh =3D cocoa_refresh, -}; - static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) { COCOA_DEBUG("qemu_cocoa: cocoa_display_init\n"); @@ -1866,14 +1869,8 @@ static void cocoa_display_init(DisplayState *ds, Dis= playOptions *opts) cursor_hide =3D 0; } =20 - dcl =3D g_malloc0(sizeof(DisplayChangeListener)); - // register vga output callbacks - dcl->ops =3D &dcl_ops; - register_displaychangelistener(dcl); - - // register cleanup function - atexit(cocoa_cleanup); + register_displaychangelistener(&dcl); } =20 static QemuDisplay qemu_display_cocoa =3D { --=20 2.29.2 From nobody Mon May 13 17:05:57 2024 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=1613772479; cv=none; d=zohomail.com; s=zohoarc; b=MRkMhfImGyGmz3imJyty5154bwBaSc8Q+Xhvo3Vw9EvyNF+r+/omTRngMZ+RkBQhfzNXCgX3rN3jlDfXxxvyghMXEu04cGgadChLxazuYRykGc37RopTieORd5ZeT+XGlX8cwtaP55QpZNygolQa51osaCF05zXbE0aB0tk5y/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613772479; 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=zk2DiMd8W+yzUdKnzi0fyYFv+METDCNspMTRwQ4oyG0=; b=EfCYlA+LLk3IPou1r8slyjNun+wK+J+Ue5KNY2J8Ld5j9xd+DGNevnJNxTU9Al9DtBxD1Mus60DA1LF5nvG9YjgOiHWXb8riiLJwGUWNm9CrUi7evgTWyWCHUL2lXjLZhm7JY4p7OES1qSa+7frcWBGXkjXX5QSc+hBcoYwz5kc= 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 1613772478668821.2135881940899; Fri, 19 Feb 2021 14:07:58 -0800 (PST) Received: from localhost ([::1]:57664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDDwL-00059E-96 for importer@patchew.org; Fri, 19 Feb 2021 17:07:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDDpW-0003Xk-1A for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lDDpT-0005ew-Of for qemu-devel@nongnu.org; Fri, 19 Feb 2021 17:00: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-351-tmz7IY9oNb2l_z-8iMvY-w-1; Fri, 19 Feb 2021 17:00:48 -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 B6B4C1005501; Fri, 19 Feb 2021 22:00:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-184.ams2.redhat.com [10.36.114.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61E46100239F; Fri, 19 Feb 2021 22:00:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3B8E91800867; Fri, 19 Feb 2021 23:00:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613772050; 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=zk2DiMd8W+yzUdKnzi0fyYFv+METDCNspMTRwQ4oyG0=; b=cCjTbtH9CQPeyZZVqryG01ax1MmjkP1IrpCgaNEhXzBx+7qTePwgQaqaKry1tx+HgjyvKf I9VoM40FJM5/Ytd1TQ3dFgM7iI+Pe7cZhZStxajbdNwBPtVqPrmODRuEZP80qbVwPvq25K E9RkXN2GaCwmR/mQRtrapuM4j2IqVJU= X-MC-Unique: tmz7IY9oNb2l_z-8iMvY-w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 8/8] ui/console: Remove dpy_gl_ctx_get_current Date: Fri, 19 Feb 2021 23:00:36 +0100 Message-Id: <20210219220036.100654-9-kraxel@redhat.com> In-Reply-To: <20210219220036.100654-1-kraxel@redhat.com> References: <20210219220036.100654-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: -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.001, 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: Peter Maydell , Gerd Hoffmann , Akihiko Odaki Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki It is not used, and it is unlikely that a new use case will emerge anytime soon because the scope of OpenGL contexts are limited due to the nature of the frontend, VirGL, processing simple commands from the guest. Remove the function and ease implementing a new OpenGL backend a little. Signed-off-by: Akihiko Odaki Message-Id: <20210219094702.90789-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 1 - ui/gtk-gl-area.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 3c1cd98db8b1..5ae0ad60a600 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -147,7 +147,6 @@ void gd_gl_area_scanout_disable(DisplayChangeListener *= dcl); void gd_gl_area_scanout_flush(DisplayChangeListener *dcl, uint32_t x, uint32_t y, uint32_t w, uint32_t= h); void gtk_gl_area_init(void); -QEMUGLContext gd_gl_area_get_current_context(DisplayChangeListener *dcl); int gd_gl_area_make_current(DisplayChangeListener *dcl, QEMUGLContext ctx); =20 diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index e7ca73c7b1b3..4e8ee88b9b39 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -239,11 +239,6 @@ void gtk_gl_area_init(void) display_opengl =3D 1; } =20 -QEMUGLContext gd_gl_area_get_current_context(DisplayChangeListener *dcl) -{ - return gdk_gl_context_get_current(); -} - int gd_gl_area_make_current(DisplayChangeListener *dcl, QEMUGLContext ctx) { --=20 2.29.2