From nobody Fri Dec 19 02:56:08 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1625583277; cv=none; d=zohomail.com; s=zohoarc; b=U4ob/Mrf4ny3V0Ny5KpQkvHWw3cyZM/KVe/6EoRscR202NHyI+Rvp0J2TJYJbPxxakRu7TuYHcQVbbf6sC2ikBnXrxahu1N6gr+nQqzhU3yHpnr3Clvw//I+cfY6PnpRzm3S86hsgkDBkjYlqJdNhEl4DqBcrFw7dBIfeCFkfMk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625583277; 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=J7A2oDsTLBGaJIfi9ny0/gldGbN1G7mlq1bGFv21O3w=; b=FcN3zLVbek2G0h9H0ColciWMHL3S6SAYN2TZ9N1+52274fzdGNMzkUoN2Rbq8+HZEki43/5TDPInSziMHnlExj9D66ZbS3X/AcG58egpIO+c/9EdPR0XslTPAW3AbhibNLzntEj5LurzHP6gUe4vijpGf17xKDCEx/RNaljVByg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1625583277212132.02271637508136; Tue, 6 Jul 2021 07:54:37 -0700 (PDT) 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-29-IYQl7K4RN1uaQlURPRbaAA-1; Tue, 06 Jul 2021 10:54:34 -0400 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 E4B215074D; Tue, 6 Jul 2021 14:54:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C040660864; Tue, 6 Jul 2021 14:54:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 81C761809CB3; Tue, 6 Jul 2021 14:54:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 166EsQmS013261 for ; Tue, 6 Jul 2021 10:54:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id D268A3702; Tue, 6 Jul 2021 14:54:26 +0000 (UTC) Received: from thuth.com (ovpn-113-37.ams2.redhat.com [10.36.113.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9437A5D6A1; Tue, 6 Jul 2021 14:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625583276; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=J7A2oDsTLBGaJIfi9ny0/gldGbN1G7mlq1bGFv21O3w=; b=RoRCQNLFwGwLHOkTMAeocpnfP2uVsUTS4l1lkaTKz3aEBWue8LdKDD0zR0/ahuuMSHUXDN zOIm1dAFnuHW4fkoCYQs2JszBXDaV4PDZR4EgY2YjPAC3X509tsHptkCpH8H3hkILXkS3Q E2WnYVVwOMabNSXJ+GSWE14espF6uiQ= X-MC-Unique: IYQl7K4RN1uaQlURPRbaAA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini Subject: [PATCH 2/3] softmmu/vl: Deprecate the old grab options Date: Tue, 6 Jul 2021 16:54:12 +0200 Message-Id: <20210706145413.1449571-3-thuth@redhat.com> In-Reply-To: <20210706145413.1449571-1-thuth@redhat.com> References: <20210706145413.1449571-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, kraxel@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1625583282034100001 Content-Type: text/plain; charset="utf-8" The alt_grab and ctrl_grab parameter of the -display sdl option prevent the QAPIfication of the "sdl" part of the -display option, so we should eventually remove them. And since this feature is also rather niche anyway, we should not clutter the top-level option list with these, so let's also deprecate the "-alt-grab" and the "-ctrl-grab" options while we're at it. Once the deprecation period of "alt_grab" and "ctrl_grab" is over, we then can finally switch the -display sdl option to use QAPI internally, too. Signed-off-by: Thomas Huth --- docs/system/deprecated.rst | 10 ++++++++++ qemu-options.hx | 12 ++++++++---- softmmu/vl.c | 6 ++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 70e08baff6..89069856f1 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -138,6 +138,16 @@ an underscore between "window" and "close"). The ``-no-quit`` is a synonym for ``-display ...,window-close=3Doff`` which should be used instead. =20 +``-alt-grab`` and ``-display sdl,alt_grab=3Don`` (since 6.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` instead. + +``-ctrl-grab`` and ``-display sdl,ctrl_grab=3Don`` (since 6.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=3Drctrl`` instead. + =20 QEMU Machine Protocol (QMP) commands ------------------------------------ diff --git a/qemu-options.hx b/qemu-options.hx index 144afad8d1..5a76544e8b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1834,9 +1834,11 @@ SRST the mouse grabbing in conjunction with the "g" key. `` can be either `lshift-lctrl-lalt` or `rctrl`. =20 - ``alt_grab=3Don|off`` : Use Control+Alt+Shift-g to toggle mouse gr= abbing + ``alt_grab=3Don|off`` : Use Control+Alt+Shift-g to toggle mouse gr= abbing. + This parameter is deprecated - use ``grab-mod`` instead. =20 - ``ctrl_grab=3Don|off`` : Use Right-Control-g to toggle mouse grabb= ing + ``ctrl_grab=3Don|off`` : Use Right-Control-g to toggle mouse grabb= ing. + This parameter is deprecated - use ``grab-mod`` instead. =20 ``gl=3Don|off|core|es`` : Use OpenGL for displaying =20 @@ -1921,7 +1923,8 @@ SRST ``-alt-grab`` Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that this also affects the special keys (for fullscreen, monitor-mode - switching, etc). + switching, etc). This option is deprecated - please use + ``-display sdl,grab-mod=3Dlshift-lctrl-lalt`` instead. ERST =20 DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab, @@ -1931,7 +1934,8 @@ SRST ``-ctrl-grab`` Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this also affects the special keys (for fullscreen, monitor-mode - switching, etc). + switching, etc). This option is deprecated - please use + ``-display sdl,grab-mod=3Drctrl`` instead. ERST =20 DEF("no-quit", 0, QEMU_OPTION_no_quit, diff --git a/softmmu/vl.c b/softmmu/vl.c index 506b88b1a2..47cd47c840 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1039,6 +1039,7 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } + warn_report("alt_grab is deprecated, use grab-mod instead.= "); } else if (strstart(opts, ",ctrl_grab=3D", &nextopt)) { opts =3D nextopt; if (strstart(opts, "on", &nextopt)) { @@ -1048,6 +1049,7 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } + warn_report("ctrl_grab is deprecated, use grab-mod instead= ."); } else if (strstart(opts, ",window_close=3D", &nextopt) || strstart(opts, ",window-close=3D", &nextopt)) { if (strstart(opts, ",window_close=3D", NULL)) { @@ -3237,9 +3239,13 @@ void qemu_init(int argc, char **argv, char **envp) break; case QEMU_OPTION_alt_grab: alt_grab =3D 1; + warn_report("-alt-grab is deprecated, please use " + "-display sdl,grab-mod=3Dlshift-lctrl-lalt ins= tead."); break; case QEMU_OPTION_ctrl_grab: ctrl_grab =3D 1; + warn_report("-ctrl-grab is deprecated, please use " + "-display sdl,grab-mod=3Drctrl instead."); break; case QEMU_OPTION_no_quit: dpy.has_window_close =3D true; --=20 2.27.0