From nobody Mon Feb 9 06:08:11 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1627297710116972.4549933406513; Mon, 26 Jul 2021 04:08:30 -0700 (PDT) Received: from localhost ([::1]:41862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yTE-0004P9-Nz for importer@patchew.org; Mon, 26 Jul 2021 07:08:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQp-0001M5-MK for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQm-0004aQ-1q for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:05:58 -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-502-SOE7j1YDMcq5lbQEQmQmqw-1; Mon, 26 Jul 2021 07:05:53 -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 E112D1008061; Mon, 26 Jul 2021 11:05:52 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BAF4F60C5F; Mon, 26 Jul 2021 11:05:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 420691800903; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297555; 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=5Qho4eUmI2j3ooWz1Puc624X/X0cOSrEZ+/Jzjb9PEk=; b=jUbgYZVfJAsh1PctRyqZglOp3pIHIJDCxRfBrIdcdBhhUKNiF6jr5P+904RdVouXauQ8xQ MK0IAATAy3fjwaa4ekcZyauFvEHWYi1gQMeaf53u/n/CkVSwMn3/K7seXcWh/Tw+ASMlgE kRFCJ+5VrfprGNAORqqMhwNfwo6Qkxk= X-MC-Unique: SOE7j1YDMcq5lbQEQmQmqw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 1/6] ui/gtk: Fix relative mouse with multiple monitors Date: Mon, 26 Jul 2021 13:05:39 +0200 Message-Id: <20210726110544.1934386-2-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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?Dennis=20W=C3=B6lfing?= , 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) X-ZM-MESSAGEID: 1627297711235100001 From: Dennis W=C3=B6lfing To handle relative mouse input the event handler needs to move the mouse away from the screen edges. Failing to do so results in the mouse getting stuck at invisible walls. However the current implementation for this is broken on hosts with multiple monitors. With multiple monitors the mouse can be located outside of the current monitor which is not handled by the current code. Also the monitor itself might be located at coordinates different from (0, 0). Signed-off-by: Dennis W=C3=B6lfing Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210720143940.291413-1-denniswoelfing@gmx.de> Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 376b4d528daa..18542c763312 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -865,37 +865,25 @@ static gboolean gd_motion_event(GtkWidget *widget, Gd= kEventMotion *motion, GdkWindow *win =3D gtk_widget_get_window(widget); GdkMonitor *monitor =3D gdk_display_get_monitor_at_window(dpy, win= ); GdkRectangle geometry; - int screen_width, screen_height; =20 int x =3D (int)motion->x_root; int y =3D (int)motion->y_root; =20 gdk_monitor_get_geometry(monitor, &geometry); - screen_width =3D geometry.width; - screen_height =3D geometry.height; =20 /* In relative mode check to see if client pointer hit - * one of the screen edges, and if so move it back by - * 200 pixels. This is important because the pointer + * one of the monitor edges, and if so move it back to the + * center of the monitor. This is important because the pointer * in the server doesn't correspond 1-for-1, and so * may still be only half way across the screen. Without * this warp, the server pointer would thus appear to hit * an invisible wall */ - if (x =3D=3D 0) { - x +=3D 200; - } - if (y =3D=3D 0) { - y +=3D 200; - } - if (x =3D=3D (screen_width - 1)) { - x -=3D 200; - } - if (y =3D=3D (screen_height - 1)) { - y -=3D 200; - } - - if (x !=3D (int)motion->x_root || y !=3D (int)motion->y_root) { + if (x <=3D geometry.x || x - geometry.x >=3D geometry.width - 1 || + y <=3D geometry.y || y - geometry.y >=3D geometry.height - 1) { GdkDevice *dev =3D gdk_event_get_device((GdkEvent *)motion); + x =3D geometry.x + geometry.width / 2; + y =3D geometry.y + geometry.height / 2; + gdk_device_warp(dev, screen, x, y); s->last_set =3D FALSE; return FALSE; --=20 2.31.1 From nobody Mon Feb 9 06:08:11 2026 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=1627297882; cv=none; d=zohomail.com; s=zohoarc; b=Iwt4X/4pS7gpWTyRQ1rOvvhSy/oVhtBRkbbNQi3RmjxrLbBkvIUFl8xb+HrZLFsNnPVxy0tcUZtwBeRUgsVWBddL8GPeUS35WcdVz1csxO4Ke6ZelPHWhCySp7sRum+ppRtgR88qkxzctdVRG5R7T/i0/weqDYlmJVMA+hmPll0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627297882; 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=JLt92j6se3ZPoQ2j7PvuNFRPhxUEIwwGwlVDgdMR6qE=; b=OnOuafji0KMJAsGtt7ezP1JlzuMB3KKfIH+mlTm3BVIwE3IRZRZoO3zAlrkzocNbmXd8f7XsFCDGlDfCtDMleifEODCEAGUqdx1FdNXImiKLJieRHE4esw+RZDIVJg02wNCPOpLTEnuiM/MGf7FkK6CMyPVo7sNYxVZWfcl5NXU= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1627297882475536.8265502419407; Mon, 26 Jul 2021 04:11:22 -0700 (PDT) Received: from localhost ([::1]:51606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yW1-0003F4-Gu for importer@patchew.org; Mon, 26 Jul 2021 07:11:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQy-0001X0-LZ for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQx-0004he-43 for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:08 -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-406-P9HdAltCO5iPnn_Z-EUuHQ-1; Mon, 26 Jul 2021 07:06:03 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 536E918C89CF; Mon, 26 Jul 2021 11:06:02 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1FBA9710C5; Mon, 26 Jul 2021 11:05:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4E6131800906; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297564; 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=JLt92j6se3ZPoQ2j7PvuNFRPhxUEIwwGwlVDgdMR6qE=; b=Dw9ks/WD8H8o/xNl+5hm4beDhbugAlF8K0XnUvVkzmyjLGFssTEZ/NbQJmDV0XbZpNbtH4 4B3XFbtbbWiX126yEW+NtHHzT2IF6ip6ioRQYTrMZemzJ134PRGWUDnd2o8PdRdb0csU1i SOJ4sRu2O0EAfXtmY0527uaUaITuqlI= X-MC-Unique: P9HdAltCO5iPnn_Z-EUuHQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/6] ui/spice: Use HAVE_SPICE_GL for OpenGL checks Date: Mon, 26 Jul 2021 13:05:40 +0200 Message-Id: <20210726110544.1934386-3-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627297882924100001 From: Akihiko Odaki Some code in ui/spice used CONFIG_OPENGL for OpenGL conditionals, but SPICE also depends on CONFIG_GBM and SPICE server whose version is 0.13.1 or later for OpenGL. Always use HAVE_SPICE_GL, which defines the precise condition. Signed-off-by: Akihiko Odaki Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210714055735.86050-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/spice-app.c | 3 ++- ui/spice-core.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/spice-app.c b/ui/spice-app.c index 641f4a9d53e3..7e71e18da9ad 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -27,6 +27,7 @@ #include =20 #include "ui/console.h" +#include "ui/spice-display.h" #include "qemu/config-file.h" #include "qemu/option.h" #include "qemu/cutils.h" @@ -175,7 +176,7 @@ static void spice_app_display_early_init(DisplayOptions= *opts) qemu_opt_set(qopts, "addr", sock_path, &error_abort); qemu_opt_set(qopts, "image-compression", "off", &error_abort); qemu_opt_set(qopts, "streaming-video", "off", &error_abort); -#ifdef CONFIG_OPENGL +#ifdef HAVE_SPICE_GL qemu_opt_set(qopts, "gl", opts->has_gl ? "on" : "off", &error_abort); display_opengl =3D opts->has_gl; #endif diff --git a/ui/spice-core.c b/ui/spice-core.c index 86d43783acac..0371055e6c17 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -1039,6 +1039,6 @@ static void spice_register_config(void) opts_init(spice_register_config); module_opts("spice"); =20 -#ifdef CONFIG_OPENGL +#ifdef HAVE_SPICE_GL module_dep("ui-opengl"); #endif --=20 2.31.1 From nobody Mon Feb 9 06:08:11 2026 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=1627297714; cv=none; d=zohomail.com; s=zohoarc; b=OoMp0VIsOD+ewPrACuYqbRJdHb2bY5bZ+aD4YX+YY+IuxfGIYPZvrzVb+esU0/x8es/15pb+LKg+b0QBsOv7Ze3oZvP4Lhr3eW/AX0FBzf3Wz8A3Dg5pCfokIlnqzly9YP31ag7rUBX7DNR8muaJaAO7M9dvtLc8gtwALD6RImk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627297714; 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=Qy0oZja2KVfPVVVAqrXApW05fVhCV91tur2MjVWYjLA=; b=cKPlLAAF9HogMMjd8Of88aEmcsW/8Heux8uTzWTU7VCWLzOpnQpsvvQV18rOv2RWH/qWYtu6Iw0exfFw8ORN2ifCR+t24D4+nBxmR41DDTFNPA8AJ6ed59+ZJKLTRYzcAgBTeVT+ZJ5ZpD8IVRY4y/egUhipsVCFCXcZQLvWr/8= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1627297714859555.3929200831664; Mon, 26 Jul 2021 04:08:34 -0700 (PDT) Received: from localhost ([::1]:42400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yTJ-0004zo-NS for importer@patchew.org; Mon, 26 Jul 2021 07:08:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQz-0001Y5-07 for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQx-0004hu-4A for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:08 -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-157-JXSXUZBSO_62kdOjO6HM8A-1; Mon, 26 Jul 2021 07:06:03 -0400 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 375F3C7402; Mon, 26 Jul 2021 11:06:02 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 631AE19D9B; Mon, 26 Jul 2021 11:05:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 593391800907; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297565; 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=Qy0oZja2KVfPVVVAqrXApW05fVhCV91tur2MjVWYjLA=; b=D8E7JbVA90NmY4WissYbu6wSxZlbceGeq+wkbTu5OqNVCnLST/LjP03fxLvUiA6+qw+yYA Oy5BfW5+cBsBElDmm53+MiXHmoAwtPJbiIOgqWkLQHYGUGkEjBNLoZOSElg+mNhoZDJYpw x2id3EOBsR7RSc3R6ffSRzURtJofm5U= X-MC-Unique: JXSXUZBSO_62kdOjO6HM8A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 3/6] ui/egl-headless: Remove a check for CONFIG_OPENGL Date: Mon, 26 Jul 2021 13:05:41 +0200 Message-Id: <20210726110544.1934386-4-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-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: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627297715536100001 From: Akihiko Odaki ui/egl-headless is only built when CONFIG_OPENGL is defined because it depends on CONFIG_OPENGL without condition. Remove a redundant conditonal in ui/egl-headless.c Signed-off-by: Akihiko Odaki Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210714055646.85952-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/egl-headless.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/egl-headless.c b/ui/egl-headless.c index 75404e0e8700..a26a2520c496 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -214,6 +214,4 @@ static void register_egl(void) =20 type_init(register_egl); =20 -#ifdef CONFIG_OPENGL module_dep("ui-opengl"); -#endif --=20 2.31.1 From nobody Mon Feb 9 06:08:11 2026 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=1627297957; cv=none; d=zohomail.com; s=zohoarc; b=GI28OzAVpvlOxzj/uFXMnonNpXidSL1otg17vSeyRPRR0lIMDpqcFxShWLS36KOQt7EpngH20Mst9EyMkoS2DVAapf6/IJtPwyWUM3f0SYApoGD21JH1+FeK4BdjumT5x1opoWkI4yEx6TxEtEff2NI83URVjHDkccoUmNGMJ9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627297957; 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=3fQJ5Fhjfhtv/lHU86aDgiru4R8Wx7Ogn7sW6atW0SA=; b=T6vvXu3Muos147+BvvMNZaX6AFB7b7y4NK9QXcZod0g8njsvtyU0oP6ZU7ayIDMUKLXFVSHD29MphoBW6pncMnYL19QmAQb8BspfpFcR+XG7iqvtnwbUV+V98tXPj4MfE+LoxnHPV0iKdyCWjZkjNdlAjK25O3JBXweDvz5ens8= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1627297957758249.69126118737984; Mon, 26 Jul 2021 04:12:37 -0700 (PDT) Received: from localhost ([::1]:53944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yXE-0005eO-Ls for importer@patchew.org; Mon, 26 Jul 2021 07:12:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yR1-0001gx-H3 for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQz-0004kQ-7u for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:11 -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-598-zs94hTpQP9SSOvTo0sdseA-1; Mon, 26 Jul 2021 07:06:04 -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 F206E8799EC; Mon, 26 Jul 2021 11:06:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B95C360C5F; Mon, 26 Jul 2021 11:06:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 656831800909; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297568; 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=3fQJ5Fhjfhtv/lHU86aDgiru4R8Wx7Ogn7sW6atW0SA=; b=TcW9Jnbk3dJrjS75JEDLjkvQzreOgmYVmA/ynLtkYN79pf5Luokn8bpz7bxfmsLDjXjr4P cGksGqlq5pf4KIKHC/asaCJqZHaq6kbWNCH984Aiw2+LgB9D5ZpM3U5TQGF27czX62E6oO c6WHHx+qY4AjOeqNpufuaZtaSFrwemw= X-MC-Unique: zs94hTpQP9SSOvTo0sdseA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 4/6] ui/cocoa: Fix the type of main's argv Date: Mon, 26 Jul 2021 13:05:42 +0200 Message-Id: <20210726110544.1934386-5-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627297959462100001 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Message-Id: <20210708165619.29299-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 9f72844b0793..68a6302184ab 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1888,12 +1888,12 @@ static void *call_qemu_main(void *opaque) exit(status); } =20 -int main (int argc, const char * argv[]) { +int main (int argc, char **argv) { QemuThread thread; =20 COCOA_DEBUG("Entered main()\n"); gArgc =3D argc; - gArgv =3D (char **)argv; + gArgv =3D argv; =20 qemu_sem_init(&display_init_sem, 0); qemu_sem_init(&app_started_sem, 0); --=20 2.31.1 From nobody Mon Feb 9 06:08:11 2026 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=1627297719; cv=none; d=zohomail.com; s=zohoarc; b=kiRLSL/Pyw6COoXVkuO0jNBXxx03XbfOvGmr/wpsrW20Uv7GTf2U/Iw5bsa79jfWXsgrnpnHt/BCUYN11nW5X/5OtOVcyA686hP1W3fIdJ0yW4wuzllvA7oe3GFjYR4CwPnBGbtGv7/j6SrXWxDLUnyo9RjbMjnxqekiEWFp+MA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627297719; 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=Di0F3LCvOBeDbQ7BzCvZZKHbH19V1ZpRlTzQl2Bbzpc=; b=Sl/iS0FAYC8SHSB1Vjgg2sULRNfauxgCo6Rb4WFBDpd9et1+M0JtjdVpdRmjdmgw1+f4zLuD+1G6k6N54DZu6NgRIPVJtPZCRzb65onRuBr4ZsHWvnOrflG2AHTcrUD5iyDteROfRbIajF68gubfhN/Wq1IEWLHtjStHEkNOVr8= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1627297719086185.534466723685; Mon, 26 Jul 2021 04:08:39 -0700 (PDT) Received: from localhost ([::1]:42816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yTO-0005GP-1Y for importer@patchew.org; Mon, 26 Jul 2021 07:08:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yR3-0001mz-OV for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yR2-0004mh-AD for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:13 -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-64-bcBHPFqiPvWN-H32PLVg2Q-1; Mon, 26 Jul 2021 07:06:09 -0400 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 F10CF1008061; Mon, 26 Jul 2021 11:06:08 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C99A01000358; Mon, 26 Jul 2021 11:06:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6EAAE180090A; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297571; 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=Di0F3LCvOBeDbQ7BzCvZZKHbH19V1ZpRlTzQl2Bbzpc=; b=EXl6naQul6R251mumwA5Gx/wiEHPbsFNqNchNGlm4ahPDT9hcb0wCjv3QJEeHNS5CATSwx 5tATv5hzPe2ZIiEaxAdDBgDdOeNSoIeqQKjVCvwetXl+QqJz7BAfdSBWBFBy3FNFZGWTf5 3x+j9uTLm1bdNponuj6lUuG8PzA4yM8= X-MC-Unique: bcBHPFqiPvWN-H32PLVg2Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 5/6] ui: update keycodemapdb submodule commit Date: Mon, 26 Jul 2021 13:05:43 +0200 Message-Id: <20210726110544.1934386-6-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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: pass (identity @redhat.com) X-ZM-MESSAGEID: 1627297719911100002 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki The change of ui/keycodemapdb effective on QEMU is only commit d21009b1c9f94b740ea66be8e48a1d8ad8124023, which adds mappings for key codes added in commit d7696ff884e35c6dacf83a7cbe3355e3b0a90125. d21009b1c9f94b740ea66be8e48a1d8ad8124023 Add QEMU QKeyCode "lang1" and "lan= g2" 320f92c36a80bfafc5d57834592a7be5fd79f104 rust: fix cargo clippy e62d42f0fd76f7bb8bf78385a83c060e66ff52b0 tests: add rust test 3e25e1ca1772fc3f2039f739f8f920450dc68e50 gen: add --lang rust 9133a0b8022d1fb063a81cc2ba3b627c14ccdfd1 tests: fix argument order Signed-off-by: Akihiko Odaki Message-Id: <20210705075912.2280-1-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/keycodemapdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/keycodemapdb b/ui/keycodemapdb index 6119e6e19a05..d21009b1c9f9 160000 --- a/ui/keycodemapdb +++ b/ui/keycodemapdb @@ -1 +1 @@ -Subproject commit 6119e6e19a050df847418de7babe5166779955e4 +Subproject commit d21009b1c9f94b740ea66be8e48a1d8ad8124023 --=20 2.31.1 From nobody Mon Feb 9 06:08:11 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 162729782979678.40069281456033; Mon, 26 Jul 2021 04:10:29 -0700 (PDT) Received: from localhost ([::1]:49126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7yVA-0001DN-P8 for importer@patchew.org; Mon, 26 Jul 2021 07:10:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yR2-0001jF-Jq for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7yQz-0004ka-Jz for qemu-devel@nongnu.org; Mon, 26 Jul 2021 07:06:12 -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-556-lLCIQDj1NfO-kA7FJUgzNw-1; Mon, 26 Jul 2021 07:06:07 -0400 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 35466801AEB; Mon, 26 Jul 2021 11:06:06 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-114-106.ams2.redhat.com [10.36.114.106]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2C5B19D9B; Mon, 26 Jul 2021 11:06:05 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7B908180090F; Mon, 26 Jul 2021 13:05:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627297569; 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=9AKkA2KvAe9+erkqAVMAYMNJfbKFF5yCSmb/NR6FBCc=; b=Xts9ex5LymkRokJsL3/xQJTm03hhAWVbeWBNW4GfG0YJMBt+bWtPH54eOiutvRcRQN8aBK dCAUB210MC9GQCgiZvsrUc6Byg9vBOmknsVlP/QtU44cR2trLDwskXqZJwZe3rwnK7n/MI i9OgfKwODZuqqTXLanbczScLYA2263A= X-MC-Unique: lLCIQDj1NfO-kA7FJUgzNw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 6/6] ui/gtk: add a keyboard fifo to the VTE consoles Date: Mon, 26 Jul 2021 13:05:44 +0200 Message-Id: <20210726110544.1934386-7-kraxel@redhat.com> In-Reply-To: <20210726110544.1934386-1-kraxel@redhat.com> References: <20210726110544.1934386-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=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.717, 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?Volker=20R=C3=BCmelin?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1627297830320100001 From: Volker R=C3=BCmelin Since commit 8eb13bbbac ("ui/gtk: vte: fix sending multiple characeters") it's very easy to lock up QEMU with the GTK ui. If you configure a guest with a serial device and the guest doesn't listen on this device, QEMU will lock up after entering two characters in the serial console. That's because current code uses a busy loop for the chardev write retries and the busy loop doesn't terminate in this case. To fix this problem add a fifo to the VTE consoles and use the chr_accept_input() callback function to write the remaining characters in the queue to the chardev. The fifo has a size of 4096 bytes, so one can copy and paste a fairly large URL or file path. Fixes: 8eb13bbbac ("ui/gtk: vte: fix sending multiple characeters") Signed-off-by: Volker R=C3=BCmelin Message-Id: <20210725165039.5242-1-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 4 ++++ ui/gtk.c | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/include/ui/gtk.h b/include/ui/gtk.h index 9516670ebc87..80d6bbd9b5f3 100644 --- a/include/ui/gtk.h +++ b/include/ui/gtk.h @@ -25,6 +25,9 @@ #include "ui/egl-helpers.h" #include "ui/egl-context.h" #endif +#ifdef CONFIG_VTE +#include "qemu/fifo8.h" +#endif =20 #define MAX_VCS 10 =20 @@ -62,6 +65,7 @@ typedef struct VirtualVteConsole { GtkWidget *scrollbar; GtkWidget *terminal; Chardev *chr; + Fifo8 out_fifo; bool echo; } VirtualVteConsole; #endif diff --git a/ui/gtk.c b/ui/gtk.c index 18542c763312..974e4dfc0b5b 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1640,6 +1640,25 @@ static void gd_vc_adjustment_changed(GtkAdjustment *= adjustment, void *opaque) } } =20 +static void gd_vc_send_chars(VirtualConsole *vc) +{ + uint32_t len, avail; + + len =3D qemu_chr_be_can_write(vc->vte.chr); + avail =3D fifo8_num_used(&vc->vte.out_fifo); + if (len > avail) { + len =3D avail; + } + while (len > 0) { + const uint8_t *buf; + uint32_t size; + + buf =3D fifo8_pop_buf(&vc->vte.out_fifo, len, &size); + qemu_chr_be_write(vc->vte.chr, (uint8_t *)buf, size); + len -=3D size; + } +} + static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len) { VCChardev *vcd =3D VC_CHARDEV(chr); @@ -1649,6 +1668,14 @@ static int gd_vc_chr_write(Chardev *chr, const uint8= _t *buf, int len) return len; } =20 +static void gd_vc_chr_accept_input(Chardev *chr) +{ + VCChardev *vcd =3D VC_CHARDEV(chr); + VirtualConsole *vc =3D vcd->console; + + gd_vc_send_chars(vc); +} + static void gd_vc_chr_set_echo(Chardev *chr, bool echo) { VCChardev *vcd =3D VC_CHARDEV(chr); @@ -1688,6 +1715,7 @@ static void char_gd_vc_class_init(ObjectClass *oc, vo= id *data) cc->parse =3D qemu_chr_parse_vc; cc->open =3D gd_vc_open; cc->chr_write =3D gd_vc_chr_write; + cc->chr_accept_input =3D gd_vc_chr_accept_input; cc->chr_set_echo =3D gd_vc_chr_set_echo; } =20 @@ -1702,6 +1730,7 @@ static gboolean gd_vc_in(VteTerminal *terminal, gchar= *text, guint size, gpointer user_data) { VirtualConsole *vc =3D user_data; + uint32_t free; =20 if (vc->vte.echo) { VteTerminal *term =3D VTE_TERMINAL(vc->vte.terminal); @@ -1721,16 +1750,10 @@ static gboolean gd_vc_in(VteTerminal *terminal, gch= ar *text, guint size, } } =20 - int remaining =3D size; - uint8_t* p =3D (uint8_t *)text; - while (remaining > 0) { - int can_write =3D qemu_chr_be_can_write(vc->vte.chr); - int written =3D MIN(remaining, can_write); - qemu_chr_be_write(vc->vte.chr, p, written); + free =3D fifo8_num_free(&vc->vte.out_fifo); + fifo8_push_all(&vc->vte.out_fifo, (uint8_t *)text, MIN(free, size)); + gd_vc_send_chars(vc); =20 - remaining -=3D written; - p +=3D written; - } return TRUE; } =20 @@ -1747,6 +1770,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, Vir= tualConsole *vc, vc->s =3D s; vc->vte.echo =3D vcd->echo; vc->vte.chr =3D chr; + fifo8_create(&vc->vte.out_fifo, 4096); vcd->console =3D vc; =20 snprintf(buffer, sizeof(buffer), "vc%d", idx); --=20 2.31.1